mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-15 22:53:43 +00:00
vendor: revendor govmm
Update govmm to add RO blk hotplug support. Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
This commit is contained in:
parent
ea069002b7
commit
fbc1d123e8
@ -32,7 +32,7 @@ require (
|
||||
github.com/gogo/googleapis v1.4.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.1
|
||||
github.com/hashicorp/go-multierror v1.0.0
|
||||
github.com/kata-containers/govmm v0.0.0-20201020052039-99f43ec18864
|
||||
github.com/kata-containers/govmm v0.0.0-20210112013750-7d320e8f5dca
|
||||
github.com/mdlayher/vsock v0.0.0-20191108225356-d9c65923cb8f
|
||||
github.com/opencontainers/image-spec v1.0.1 // indirect
|
||||
github.com/opencontainers/runc v1.0.0-rc9.0.20200102164712-2b52db75279c
|
||||
|
@ -198,6 +198,8 @@ github.com/juju/testing v0.0.0-20190613124551-e81189438503/go.mod h1:63prj8cnj0t
|
||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||
github.com/kata-containers/govmm v0.0.0-20201020052039-99f43ec18864 h1:ETwjbdr9aU/J90P5D/HAxRW8M4r0HQSPmuBDIaNr9EM=
|
||||
github.com/kata-containers/govmm v0.0.0-20201020052039-99f43ec18864/go.mod h1:VmAHbsL5lLfzHW/MNL96NVLF840DNEV5i683kISgFKk=
|
||||
github.com/kata-containers/govmm v0.0.0-20210112013750-7d320e8f5dca h1:UdXFthwasAPnmv37gLJUEFsW9FaabYA+mM6FoSi8kzU=
|
||||
github.com/kata-containers/govmm v0.0.0-20210112013750-7d320e8f5dca/go.mod h1:VmAHbsL5lLfzHW/MNL96NVLF840DNEV5i683kISgFKk=
|
||||
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
||||
|
13
src/runtime/vendor/github.com/kata-containers/govmm/qemu/qemu.go
generated
vendored
13
src/runtime/vendor/github.com/kata-containers/govmm/qemu/qemu.go
generated
vendored
@ -135,7 +135,7 @@ const (
|
||||
|
||||
func isDimmSupported(config *Config) bool {
|
||||
switch runtime.GOARCH {
|
||||
case "amd64", "386", "ppc64le":
|
||||
case "amd64", "386", "ppc64le", "arm64":
|
||||
if config != nil && config.Machine.Type == MachineTypeMicrovm {
|
||||
// microvm does not support NUMA
|
||||
return false
|
||||
@ -2300,6 +2300,9 @@ type Config struct {
|
||||
// Bios is the -bios parameter
|
||||
Bios string
|
||||
|
||||
// PFlash specifies the parallel flash images (-pflash parameter)
|
||||
PFlash []string
|
||||
|
||||
// Incoming controls migration source preparation
|
||||
Incoming Incoming
|
||||
|
||||
@ -2490,6 +2493,13 @@ func (config *Config) appendGlobalParam() {
|
||||
}
|
||||
}
|
||||
|
||||
func (config *Config) appendPFlashParam() {
|
||||
for _, p := range config.PFlash {
|
||||
config.qemuParams = append(config.qemuParams, "-pflash")
|
||||
config.qemuParams = append(config.qemuParams, p)
|
||||
}
|
||||
}
|
||||
|
||||
func (config *Config) appendVGA() {
|
||||
if config.VGA != "" {
|
||||
config.qemuParams = append(config.qemuParams, "-vga")
|
||||
@ -2675,6 +2685,7 @@ func LaunchQemu(config Config, logger QMPLog) (string, error) {
|
||||
config.appendDevices()
|
||||
config.appendRTC()
|
||||
config.appendGlobalParam()
|
||||
config.appendPFlashParam()
|
||||
config.appendVGA()
|
||||
config.appendKnobs()
|
||||
config.appendKernel()
|
||||
|
13
src/runtime/vendor/github.com/kata-containers/govmm/qemu/qmp.go
generated
vendored
13
src/runtime/vendor/github.com/kata-containers/govmm/qemu/qmp.go
generated
vendored
@ -773,11 +773,12 @@ func (q *QMP) ExecuteQuit(ctx context.Context) error {
|
||||
return q.executeCommand(ctx, "quit", nil, nil)
|
||||
}
|
||||
|
||||
func (q *QMP) blockdevAddBaseArgs(device, blockdevID string) (map[string]interface{}, map[string]interface{}) {
|
||||
func (q *QMP) blockdevAddBaseArgs(device, blockdevID string, ro bool) (map[string]interface{}, map[string]interface{}) {
|
||||
var args map[string]interface{}
|
||||
|
||||
blockdevArgs := map[string]interface{}{
|
||||
"driver": "raw",
|
||||
"driver": "raw",
|
||||
"read-only": ro,
|
||||
"file": map[string]interface{}{
|
||||
"driver": "file",
|
||||
"filename": device,
|
||||
@ -801,8 +802,8 @@ func (q *QMP) blockdevAddBaseArgs(device, blockdevID string) (map[string]interfa
|
||||
// path of the device to add, e.g., /dev/rdb0, and blockdevID is an identifier
|
||||
// used to name the device. As this identifier will be passed directly to QMP,
|
||||
// it must obey QMP's naming rules, e,g., it must start with a letter.
|
||||
func (q *QMP) ExecuteBlockdevAdd(ctx context.Context, device, blockdevID string) error {
|
||||
args, _ := q.blockdevAddBaseArgs(device, blockdevID)
|
||||
func (q *QMP) ExecuteBlockdevAdd(ctx context.Context, device, blockdevID string, ro bool) error {
|
||||
args, _ := q.blockdevAddBaseArgs(device, blockdevID, ro)
|
||||
|
||||
return q.executeCommand(ctx, "blockdev-add", args, nil)
|
||||
}
|
||||
@ -814,8 +815,8 @@ func (q *QMP) ExecuteBlockdevAdd(ctx context.Context, device, blockdevID string)
|
||||
// direct denotes whether use of O_DIRECT (bypass the host page cache)
|
||||
// is enabled. noFlush denotes whether flush requests for the device are
|
||||
// ignored.
|
||||
func (q *QMP) ExecuteBlockdevAddWithCache(ctx context.Context, device, blockdevID string, direct, noFlush bool) error {
|
||||
args, blockdevArgs := q.blockdevAddBaseArgs(device, blockdevID)
|
||||
func (q *QMP) ExecuteBlockdevAddWithCache(ctx context.Context, device, blockdevID string, direct, noFlush, ro bool) error {
|
||||
args, blockdevArgs := q.blockdevAddBaseArgs(device, blockdevID, ro)
|
||||
|
||||
if q.version.Major < 2 || (q.version.Major == 2 && q.version.Minor < 9) {
|
||||
return fmt.Errorf("versions of qemu (%d.%d) older than 2.9 do not support set cache-related options for block devices",
|
||||
|
2
src/runtime/vendor/github.com/sirupsen/logrus/go.mod
generated
vendored
2
src/runtime/vendor/github.com/sirupsen/logrus/go.mod
generated
vendored
@ -1,7 +1,5 @@
|
||||
module github.com/sirupsen/logrus
|
||||
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1
|
||||
|
2
src/runtime/vendor/modules.txt
vendored
2
src/runtime/vendor/modules.txt
vendored
@ -222,7 +222,7 @@ github.com/hashicorp/errwrap
|
||||
# github.com/hashicorp/go-multierror v1.0.0
|
||||
## explicit
|
||||
github.com/hashicorp/go-multierror
|
||||
# github.com/kata-containers/govmm v0.0.0-20201020052039-99f43ec18864
|
||||
# github.com/kata-containers/govmm v0.0.0-20210112013750-7d320e8f5dca
|
||||
## explicit
|
||||
github.com/kata-containers/govmm/qemu
|
||||
# github.com/konsorten/go-windows-terminal-sequences v1.0.1
|
||||
|
Loading…
Reference in New Issue
Block a user