mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-17 15:38:00 +00:00
vendor: revendor govmm from intel to kata-containers
- Update where we vendor govmm - Grab latest Signed-off-by: Eric Ernst <eric.g.ernst@gmail.com>
This commit is contained in:
parent
4f7f25d1a1
commit
6b6668998f
@ -32,7 +32,7 @@ require (
|
|||||||
github.com/gogo/googleapis v1.4.0 // indirect
|
github.com/gogo/googleapis v1.4.0 // indirect
|
||||||
github.com/gogo/protobuf v1.3.1
|
github.com/gogo/protobuf v1.3.1
|
||||||
github.com/hashicorp/go-multierror v1.0.0
|
github.com/hashicorp/go-multierror v1.0.0
|
||||||
github.com/intel/govmm v0.0.0-20200825065022-6042f6033126
|
github.com/kata-containers/govmm v0.0.0-20210112013750-7d320e8f5dca
|
||||||
github.com/mdlayher/vsock v0.0.0-20191108225356-d9c65923cb8f
|
github.com/mdlayher/vsock v0.0.0-20191108225356-d9c65923cb8f
|
||||||
github.com/opencontainers/image-spec v1.0.1 // indirect
|
github.com/opencontainers/image-spec v1.0.1 // indirect
|
||||||
github.com/opencontainers/runc v1.0.0-rc9.0.20200102164712-2b52db75279c
|
github.com/opencontainers/runc v1.0.0-rc9.0.20200102164712-2b52db75279c
|
||||||
|
@ -164,12 +164,6 @@ github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHh
|
|||||||
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
|
||||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
||||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||||
github.com/intel/govmm v0.0.0-20200724170648-af9e34b91ae9 h1:GSRnVLRNweZV3f8Vo3vtMlPsuzvpj57Gj7Y7TkGVO6U=
|
|
||||||
github.com/intel/govmm v0.0.0-20200724170648-af9e34b91ae9/go.mod h1:QKGWoQtjvkvFtzP6ybiM3lxUHqf83Sv3oLqyELUKH4g=
|
|
||||||
github.com/intel/govmm v0.0.0-20200728135209-6c3315ba8a42 h1:Yu3/MlZl/kKE0Ipgio/KVorMIrjeHTVOG4+9WAddgOQ=
|
|
||||||
github.com/intel/govmm v0.0.0-20200728135209-6c3315ba8a42/go.mod h1:QKGWoQtjvkvFtzP6ybiM3lxUHqf83Sv3oLqyELUKH4g=
|
|
||||||
github.com/intel/govmm v0.0.0-20200825065022-6042f6033126 h1:yltaUdR0Vitnn/FEfy+JWbJ+oGhMAPP/3S7ja9S5yso=
|
|
||||||
github.com/intel/govmm v0.0.0-20200825065022-6042f6033126/go.mod h1:QKGWoQtjvkvFtzP6ybiM3lxUHqf83Sv3oLqyELUKH4g=
|
|
||||||
github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
|
github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA=
|
||||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
||||||
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
||||||
@ -179,7 +173,8 @@ github.com/juju/errors v0.0.0-20180806074554-22422dad46e1/go.mod h1:W54LbzXuIE0b
|
|||||||
github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U=
|
github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U=
|
||||||
github.com/juju/testing v0.0.0-20190613124551-e81189438503/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA=
|
github.com/juju/testing v0.0.0-20190613124551-e81189438503/go.mod h1:63prj8cnj0tU0S9OHjGJn+b1h0ZghCndfnbQolrYTwA=
|
||||||
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
|
||||||
github.com/kata-containers/kata-containers v0.0.0-20201013034856-c88820454d08 h1:yk9fzLKb9RmV9xuT5mkJw4owk/K0rX5cusm2ukEEDro=
|
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/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/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk=
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/BurntSushi/toml"
|
"github.com/BurntSushi/toml"
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
vc "github.com/kata-containers/kata-containers/src/runtime/virtcontainers"
|
vc "github.com/kata-containers/kata-containers/src/runtime/virtcontainers"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
||||||
exp "github.com/kata-containers/kata-containers/src/runtime/virtcontainers/experimental"
|
exp "github.com/kata-containers/kata-containers/src/runtime/virtcontainers/experimental"
|
||||||
|
22
src/runtime/vendor/github.com/intel/govmm/CONTRIBUTORS.md
generated
vendored
22
src/runtime/vendor/github.com/intel/govmm/CONTRIBUTORS.md
generated
vendored
@ -1,22 +0,0 @@
|
|||||||
This file is a partial list of contributors to the Virtual Machine
|
|
||||||
Manager for Go project. To see the full list of contributors, see the
|
|
||||||
revision history in source control.
|
|
||||||
|
|
||||||
Contributors who wish to be recognized in this file should add
|
|
||||||
themselves (or their employer, as appropriate).
|
|
||||||
|
|
||||||
- afrosi@de.ibm.com
|
|
||||||
- archana.m.shinde@intel.com
|
|
||||||
- caoruidong@huawei.com
|
|
||||||
- clare.chenhui@huawei.com
|
|
||||||
- eric.ernst@intel.com
|
|
||||||
- james.o.hunt@intel.com
|
|
||||||
- jose.carlos.venegas.munoz@intel.com
|
|
||||||
- julio.montes@intel.com
|
|
||||||
- manohar.r.castelino@intel.com
|
|
||||||
- mark.d.ryan@intel.com
|
|
||||||
- robert.bradford@intel.com
|
|
||||||
- sameo@linux.intel.com
|
|
||||||
- sebastien.boeuf@intel.com
|
|
||||||
- teawater@hyper.sh
|
|
||||||
- xinda.zhao@intel.com
|
|
@ -135,7 +135,7 @@ const (
|
|||||||
|
|
||||||
func isDimmSupported(config *Config) bool {
|
func isDimmSupported(config *Config) bool {
|
||||||
switch runtime.GOARCH {
|
switch runtime.GOARCH {
|
||||||
case "amd64", "386", "ppc64le":
|
case "amd64", "386", "ppc64le", "arm64":
|
||||||
if config != nil && config.Machine.Type == MachineTypeMicrovm {
|
if config != nil && config.Machine.Type == MachineTypeMicrovm {
|
||||||
// microvm does not support NUMA
|
// microvm does not support NUMA
|
||||||
return false
|
return false
|
||||||
@ -1084,6 +1084,8 @@ func (blkdev BlockDevice) QemuParams(config *Config) []string {
|
|||||||
deviceParams = append(deviceParams, fmt.Sprintf(",share-rw=on"))
|
deviceParams = append(deviceParams, fmt.Sprintf(",share-rw=on"))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deviceParams = append(deviceParams, fmt.Sprintf(",serial=%s", blkdev.ID))
|
||||||
|
|
||||||
blkParams = append(blkParams, fmt.Sprintf("id=%s", blkdev.ID))
|
blkParams = append(blkParams, fmt.Sprintf("id=%s", blkdev.ID))
|
||||||
blkParams = append(blkParams, fmt.Sprintf(",file=%s", blkdev.File))
|
blkParams = append(blkParams, fmt.Sprintf(",file=%s", blkdev.File))
|
||||||
blkParams = append(blkParams, fmt.Sprintf(",aio=%s", blkdev.AIO))
|
blkParams = append(blkParams, fmt.Sprintf(",aio=%s", blkdev.AIO))
|
||||||
@ -1118,6 +1120,24 @@ func (blkdev BlockDevice) deviceName(config *Config) string {
|
|||||||
return string(blkdev.Driver)
|
return string(blkdev.Driver)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PVPanicDevice represents a qemu pvpanic device.
|
||||||
|
type PVPanicDevice struct {
|
||||||
|
NoShutdown bool
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid always returns true for pvpanic device
|
||||||
|
func (dev PVPanicDevice) Valid() bool {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// QemuParams returns the qemu parameters built out of this serial device.
|
||||||
|
func (dev PVPanicDevice) QemuParams(config *Config) []string {
|
||||||
|
if dev.NoShutdown {
|
||||||
|
return []string{"-device", "pvpanic", "-no-shutdown"}
|
||||||
|
}
|
||||||
|
return []string{"-device", "pvpanic"}
|
||||||
|
}
|
||||||
|
|
||||||
// VhostUserDevice represents a qemu vhost-user device meant to be passed
|
// VhostUserDevice represents a qemu vhost-user device meant to be passed
|
||||||
// in to the guest
|
// in to the guest
|
||||||
type VhostUserDevice struct {
|
type VhostUserDevice struct {
|
||||||
@ -2103,6 +2123,56 @@ type Kernel struct {
|
|||||||
Params string
|
Params string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FwCfg allows QEMU to pass entries to the guest
|
||||||
|
// File and Str are mutually exclusive
|
||||||
|
type FwCfg struct {
|
||||||
|
Name string
|
||||||
|
File string
|
||||||
|
Str string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Valid returns true if the FwCfg structure is valid and complete.
|
||||||
|
func (fwcfg FwCfg) Valid() bool {
|
||||||
|
if fwcfg.Name == "" {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if fwcfg.File != "" && fwcfg.Str != "" {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
if fwcfg.File == "" && fwcfg.Str == "" {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
// QemuParams returns the qemu parameters built out of the FwCfg object
|
||||||
|
func (fwcfg FwCfg) QemuParams(config *Config) []string {
|
||||||
|
var fwcfgParams []string
|
||||||
|
var qemuParams []string
|
||||||
|
|
||||||
|
for _, f := range config.FwCfg {
|
||||||
|
if f.Name != "" {
|
||||||
|
fwcfgParams = append(fwcfgParams, fmt.Sprintf("name=%s", f.Name))
|
||||||
|
|
||||||
|
if f.File != "" {
|
||||||
|
fwcfgParams = append(fwcfgParams, fmt.Sprintf(",file=%s", f.File))
|
||||||
|
}
|
||||||
|
|
||||||
|
if f.Str != "" {
|
||||||
|
fwcfgParams = append(fwcfgParams, fmt.Sprintf(",string=%s", f.Str))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
qemuParams = append(qemuParams, "-fw_cfg")
|
||||||
|
qemuParams = append(qemuParams, strings.Join(fwcfgParams, ""))
|
||||||
|
}
|
||||||
|
|
||||||
|
return qemuParams
|
||||||
|
}
|
||||||
|
|
||||||
// Knobs regroups a set of qemu boolean settings
|
// Knobs regroups a set of qemu boolean settings
|
||||||
type Knobs struct {
|
type Knobs struct {
|
||||||
// NoUserConfig prevents qemu from loading user config files.
|
// NoUserConfig prevents qemu from loading user config files.
|
||||||
@ -2230,12 +2300,18 @@ type Config struct {
|
|||||||
// Bios is the -bios parameter
|
// Bios is the -bios parameter
|
||||||
Bios string
|
Bios string
|
||||||
|
|
||||||
|
// PFlash specifies the parallel flash images (-pflash parameter)
|
||||||
|
PFlash []string
|
||||||
|
|
||||||
// Incoming controls migration source preparation
|
// Incoming controls migration source preparation
|
||||||
Incoming Incoming
|
Incoming Incoming
|
||||||
|
|
||||||
// fds is a list of open file descriptors to be passed to the spawned qemu process
|
// fds is a list of open file descriptors to be passed to the spawned qemu process
|
||||||
fds []*os.File
|
fds []*os.File
|
||||||
|
|
||||||
|
// FwCfg is the -fw_cfg parameter
|
||||||
|
FwCfg []FwCfg
|
||||||
|
|
||||||
IOThreads []IOThread
|
IOThreads []IOThread
|
||||||
|
|
||||||
// PidFile is the -pidfile parameter
|
// PidFile is the -pidfile parameter
|
||||||
@ -2417,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() {
|
func (config *Config) appendVGA() {
|
||||||
if config.VGA != "" {
|
if config.VGA != "" {
|
||||||
config.qemuParams = append(config.qemuParams, "-vga")
|
config.qemuParams = append(config.qemuParams, "-vga")
|
||||||
@ -2568,6 +2651,21 @@ func (config *Config) appendLogFile() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (config *Config) appendFwCfg(logger QMPLog) {
|
||||||
|
if logger == nil {
|
||||||
|
logger = qmpNullLogger{}
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, f := range config.FwCfg {
|
||||||
|
if !f.Valid() {
|
||||||
|
logger.Errorf("fw_cfg is not valid: %+v", config.FwCfg)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
config.qemuParams = append(config.qemuParams, f.QemuParams(config)...)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// LaunchQemu can be used to launch a new qemu instance.
|
// LaunchQemu can be used to launch a new qemu instance.
|
||||||
//
|
//
|
||||||
// The Config parameter contains a set of qemu parameters and settings.
|
// The Config parameter contains a set of qemu parameters and settings.
|
||||||
@ -2587,6 +2685,7 @@ func LaunchQemu(config Config, logger QMPLog) (string, error) {
|
|||||||
config.appendDevices()
|
config.appendDevices()
|
||||||
config.appendRTC()
|
config.appendRTC()
|
||||||
config.appendGlobalParam()
|
config.appendGlobalParam()
|
||||||
|
config.appendPFlashParam()
|
||||||
config.appendVGA()
|
config.appendVGA()
|
||||||
config.appendKnobs()
|
config.appendKnobs()
|
||||||
config.appendKernel()
|
config.appendKernel()
|
||||||
@ -2595,6 +2694,7 @@ func LaunchQemu(config Config, logger QMPLog) (string, error) {
|
|||||||
config.appendIncoming()
|
config.appendIncoming()
|
||||||
config.appendPidFile()
|
config.appendPidFile()
|
||||||
config.appendLogFile()
|
config.appendLogFile()
|
||||||
|
config.appendFwCfg(logger)
|
||||||
|
|
||||||
if err := config.appendCPUs(); err != nil {
|
if err := config.appendCPUs(); err != nil {
|
||||||
return "", err
|
return "", err
|
@ -268,7 +268,7 @@ func (q *QMP) readLoop(fromVMCh chan<- []byte) {
|
|||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
line := scanner.Bytes()
|
line := scanner.Bytes()
|
||||||
if q.cfg.Logger.V(1) {
|
if q.cfg.Logger.V(1) {
|
||||||
q.cfg.Logger.Infof("%s", string(line))
|
q.cfg.Logger.Infof("read from QMP: %s", string(line))
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since []byte channel type transfer slice info(include slice underlying array pointer, len, cap)
|
// Since []byte channel type transfer slice info(include slice underlying array pointer, len, cap)
|
||||||
@ -773,11 +773,12 @@ func (q *QMP) ExecuteQuit(ctx context.Context) error {
|
|||||||
return q.executeCommand(ctx, "quit", nil, nil)
|
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{}
|
var args map[string]interface{}
|
||||||
|
|
||||||
blockdevArgs := map[string]interface{}{
|
blockdevArgs := map[string]interface{}{
|
||||||
"driver": "raw",
|
"driver": "raw",
|
||||||
|
"read-only": ro,
|
||||||
"file": map[string]interface{}{
|
"file": map[string]interface{}{
|
||||||
"driver": "file",
|
"driver": "file",
|
||||||
"filename": device,
|
"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
|
// 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,
|
// 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.
|
// 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 {
|
func (q *QMP) ExecuteBlockdevAdd(ctx context.Context, device, blockdevID string, ro bool) error {
|
||||||
args, _ := q.blockdevAddBaseArgs(device, blockdevID)
|
args, _ := q.blockdevAddBaseArgs(device, blockdevID, ro)
|
||||||
|
|
||||||
return q.executeCommand(ctx, "blockdev-add", args, nil)
|
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)
|
// direct denotes whether use of O_DIRECT (bypass the host page cache)
|
||||||
// is enabled. noFlush denotes whether flush requests for the device are
|
// is enabled. noFlush denotes whether flush requests for the device are
|
||||||
// ignored.
|
// ignored.
|
||||||
func (q *QMP) ExecuteBlockdevAddWithCache(ctx context.Context, device, blockdevID string, direct, noFlush bool) error {
|
func (q *QMP) ExecuteBlockdevAddWithCache(ctx context.Context, device, blockdevID string, direct, noFlush, ro bool) error {
|
||||||
args, blockdevArgs := q.blockdevAddBaseArgs(device, blockdevID)
|
args, blockdevArgs := q.blockdevAddBaseArgs(device, blockdevID, ro)
|
||||||
|
|
||||||
if q.version.Major < 2 || (q.version.Major == 2 && q.version.Minor < 9) {
|
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",
|
return fmt.Errorf("versions of qemu (%d.%d) older than 2.9 do not support set cache-related options for block devices",
|
||||||
@ -1639,3 +1640,29 @@ func (q *QMP) ExecQomSet(ctx context.Context, path, property string, value uint6
|
|||||||
|
|
||||||
return q.executeCommand(ctx, "qom-set", args, nil)
|
return q.executeCommand(ctx, "qom-set", args, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ExecQomGet qom-get path property
|
||||||
|
func (q *QMP) ExecQomGet(ctx context.Context, path, property string) (interface{}, error) {
|
||||||
|
args := map[string]interface{}{
|
||||||
|
"path": path,
|
||||||
|
"property": property,
|
||||||
|
}
|
||||||
|
|
||||||
|
response, err := q.executeCommandWithResponse(ctx, "qom-get", args, nil, nil)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
|
||||||
|
return response, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExecuteDumpGuestMemory dump guest memory to host
|
||||||
|
func (q *QMP) ExecuteDumpGuestMemory(ctx context.Context, protocol string, paging bool, format string) error {
|
||||||
|
args := map[string]interface{}{
|
||||||
|
"protocol": protocol,
|
||||||
|
"paging": paging,
|
||||||
|
"format": format,
|
||||||
|
}
|
||||||
|
|
||||||
|
return q.executeCommand(ctx, "dump-guest-memory", args, nil)
|
||||||
|
}
|
4
src/runtime/vendor/modules.txt
vendored
4
src/runtime/vendor/modules.txt
vendored
@ -222,9 +222,9 @@ github.com/hashicorp/errwrap
|
|||||||
# github.com/hashicorp/go-multierror v1.0.0
|
# github.com/hashicorp/go-multierror v1.0.0
|
||||||
## explicit
|
## explicit
|
||||||
github.com/hashicorp/go-multierror
|
github.com/hashicorp/go-multierror
|
||||||
# github.com/intel/govmm v0.0.0-20200825065022-6042f6033126
|
# github.com/kata-containers/govmm v0.0.0-20210112013750-7d320e8f5dca
|
||||||
## explicit
|
## explicit
|
||||||
github.com/intel/govmm/qemu
|
github.com/kata-containers/govmm/qemu
|
||||||
# github.com/konsorten/go-windows-terminal-sequences v1.0.1
|
# github.com/konsorten/go-windows-terminal-sequences v1.0.1
|
||||||
github.com/konsorten/go-windows-terminal-sequences
|
github.com/konsorten/go-windows-terminal-sequences
|
||||||
# github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329
|
# github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329
|
||||||
|
@ -24,7 +24,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
"github.com/opencontainers/selinux/go-selinux/label"
|
"github.com/opencontainers/selinux/go-selinux/label"
|
||||||
"github.com/opentracing/opentracing-go"
|
"github.com/opentracing/opentracing-go"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
|
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
||||||
|
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
)
|
)
|
||||||
|
|
||||||
type qemuAmd64 struct {
|
type qemuAmd64 struct {
|
||||||
@ -109,7 +109,7 @@ func newQemuArch(config HypervisorConfig) (qemuArch, error) {
|
|||||||
var q35QemuIOMMUOptions = "accel=kvm,kernel_irqchip=split"
|
var q35QemuIOMMUOptions = "accel=kvm,kernel_irqchip=split"
|
||||||
|
|
||||||
kernelParams = append(kernelParams,
|
kernelParams = append(kernelParams,
|
||||||
Param{"intel_iommu", "on"})
|
Param{"kata-containers_iommu", "on"})
|
||||||
kernelParams = append(kernelParams,
|
kernelParams = append(kernelParams,
|
||||||
Param{"iommu", "pt"})
|
Param{"iommu", "pt"})
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
@ -255,7 +255,7 @@ func TestQemuAmd64Iommu(t *testing.T) {
|
|||||||
assert.NoError(err)
|
assert.NoError(err)
|
||||||
|
|
||||||
p := qemu.kernelParameters(false)
|
p := qemu.kernelParameters(false)
|
||||||
assert.Contains(p, Param{"intel_iommu", "on"})
|
assert.Contains(p, Param{"kata-containers_iommu", "on"})
|
||||||
|
|
||||||
m := qemu.machine()
|
m := qemu.machine()
|
||||||
assert.Contains(m.Options, "kernel_irqchip=split")
|
assert.Contains(m.Options, "kernel_irqchip=split")
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
|
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
||||||
)
|
)
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
govmmQemu "github.com/intel/govmm/qemu"
|
govmmQemu "github.com/kata-containers/govmm/qemu"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/device/config"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/persist"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/persist"
|
||||||
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
"github.com/kata-containers/kata-containers/src/runtime/virtcontainers/types"
|
||||||
|
Loading…
Reference in New Issue
Block a user