vendor: vendor latest govmm

Includes --share-rw option for hotplugging disks.

govmm Shortlog:

2706a07 qemu: Use the supplied context.Context for launching
e46092e qemu: Do not try and generate invalid RTC parameters
fcaf61d qemu/qmp: add vfio mediated device support
4461c45 disk: Add --share-rw option for hotplugging disks
6851999 qemu/qmp: add addr and bus to hotplug vsock devices

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
Archana Shinde
2018-08-17 14:31:41 -07:00
parent f70d6d2acb
commit b9e0ca340d
4 changed files with 59 additions and 26 deletions

View File

@@ -1064,16 +1064,12 @@ type RTC struct {
// Valid returns true if the RTC structure is valid and complete.
func (rtc RTC) Valid() bool {
if rtc.Clock != "" {
if rtc.Clock != Host && rtc.Clock != VM {
return false
}
if rtc.Clock != Host && rtc.Clock != VM {
return false
}
if rtc.DriftFix != "" {
if rtc.DriftFix != Slew && rtc.DriftFix != NoDriftFix {
return false
}
if rtc.DriftFix != Slew && rtc.DriftFix != NoDriftFix {
return false
}
return true
@@ -1239,7 +1235,7 @@ type Config struct {
// Path is the qemu binary path.
Path string
// Ctx is not used at the moment.
// Ctx is the context used when launching qemu.
Ctx context.Context
// Name is the qemu guest name
@@ -1636,7 +1632,12 @@ func LaunchQemu(config Config, logger QMPLog) (string, error) {
return "", err
}
return LaunchCustomQemu(config.Ctx, config.Path, config.qemuParams,
ctx := config.Ctx
if ctx == nil {
ctx = context.Background()
}
return LaunchCustomQemu(ctx, config.Path, config.qemuParams,
config.fds, nil, logger)
}
@@ -1644,10 +1645,6 @@ func LaunchQemu(config Config, logger QMPLog) (string, error) {
//
// The path parameter is used to pass the qemu executable path.
//
// The ctx parameter is not currently used but has been added so that the
// signature of this function will not need to change when launch cancellation
// is implemented.
//
// params is a slice of options to pass to qemu-system-x86_64 and fds is a
// list of open file descriptors that are to be passed to the spawned qemu
// process. The attrs parameter can be used to control aspects of the
@@ -1672,7 +1669,7 @@ func LaunchCustomQemu(ctx context.Context, path string, params []string, fds []*
}
/* #nosec */
cmd := exec.Command(path, params...)
cmd := exec.CommandContext(ctx, path, params...)
if len(fds) > 0 {
logger.Infof("Adding extra file %v", fds)
cmd.ExtraFiles = fds