diff --git a/Gopkg.lock b/Gopkg.lock index 937629310b..1cf32d83a9 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -420,11 +420,11 @@ revision = "2f1d1f20f75d5404f53b9edf6b53ed5505508675" [[projects]] - digest = "1:7da77d369663620053d58018f194662e25c1614a188b675e6403bc2b5e987c25" + digest = "1:ded834b4e437433e3f75a95041ca4e0013e1acd358218c833289986566108f67" name = "github.com/intel/govmm" packages = ["qemu"] pruneopts = "NUT" - revision = "7cc469641b7b4e541b56908849348b2dabbaf6a1" + revision = "af9e34b91ae99aff4b4ac126141259d34d98e9f2" [[projects]] digest = "1:dc74f6b065e6204ee3a90ce4209dae99126a110a4cd318f696a69a781916c849" diff --git a/Gopkg.toml b/Gopkg.toml index d7f061918b..87523bcfab 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -48,7 +48,7 @@ [[constraint]] name = "github.com/intel/govmm" - revision = "7cc469641b7b4e541b56908849348b2dabbaf6a1" + revision = "af9e34b91ae99aff4b4ac126141259d34d98e9f2" [[constraint]] name = "github.com/kata-containers/agent" diff --git a/vendor/github.com/intel/govmm/qemu/qemu.go b/vendor/github.com/intel/govmm/qemu/qemu.go index a149dad8b0..4716595cd7 100644 --- a/vendor/github.com/intel/govmm/qemu/qemu.go +++ b/vendor/github.com/intel/govmm/qemu/qemu.go @@ -288,6 +288,23 @@ func (object Object) QemuParams(config *Config) []string { return qemuParams } +// Virtio9PMultidev filesystem behaviour to deal +// with multiple devices being shared with a 9p export. +type Virtio9PMultidev string + +const ( + // Remap shares multiple devices with only one export. + Remap Virtio9PMultidev = "remap" + + // Warn assumes that only one device is shared by the same export. + // Only a warning message is logged (once) by qemu on host side. + // This is the default behaviour. + Warn Virtio9PMultidev = "warn" + + // Forbid like "warn" but also deny access to additional devices on guest. + Forbid Virtio9PMultidev = "forbid" +) + // FSDriver represents a qemu filesystem driver. type FSDriver string @@ -350,6 +367,10 @@ type FSDevice struct { // Transport is the virtio transport for this device. Transport VirtioTransport + + // Multidev is the filesystem behaviour to deal + // with multiple devices being shared with a 9p export + Multidev Virtio9PMultidev } // Virtio9PTransport is a map of the virtio-9p device name that corresponds @@ -393,6 +414,10 @@ func (fsdev FSDevice) QemuParams(config *Config) []string { fsParams = append(fsParams, fmt.Sprintf(",path=%s", fsdev.Path)) fsParams = append(fsParams, fmt.Sprintf(",security_model=%s", fsdev.SecurityModel)) + if fsdev.Multidev != "" { + fsParams = append(fsParams, fmt.Sprintf(",multidevs=%s", fsdev.Multidev)) + } + qemuParams = append(qemuParams, "-device") qemuParams = append(qemuParams, strings.Join(deviceParams, ""))