vendor: Update govmm to add vfio mediated device support on root bus

In addition to supporting hotplug for VFIO mediated device on PCI bridge,
this patch adds hotplug functionality on root bus.

When parameter bus and addr are set to be empty, the system will pick up
an empty slot on root bus.

Fixes #542

Signed-off-by: Zhao Xinda <xinda.zhao@intel.com>
This commit is contained in:
Zhao Xinda 2018-09-20 14:55:20 +08:00
parent 76b0c3c7d3
commit 2216d528f6
3 changed files with 5 additions and 3 deletions

2
Gopkg.lock generated
View File

@ -127,7 +127,7 @@
name = "github.com/intel/govmm" name = "github.com/intel/govmm"
packages = ["qemu"] packages = ["qemu"]
pruneopts = "NUT" pruneopts = "NUT"
revision = "032705ba6aae05a9bf41e296cf89c8529cffb822" revision = "9905ae92c5915c07abeb669eaa4d7f7408834b51"
[[projects]] [[projects]]
digest = "1:672470f31bc4e50f9ba09a1af7ab6035bf8b1452db64dfd79b1a22614bb30710" digest = "1:672470f31bc4e50f9ba09a1af7ab6035bf8b1452db64dfd79b1a22614bb30710"

View File

@ -52,7 +52,7 @@
[[constraint]] [[constraint]]
name = "github.com/intel/govmm" name = "github.com/intel/govmm"
revision = "032705ba6aae05a9bf41e296cf89c8529cffb822" revision = "9905ae92c5915c07abeb669eaa4d7f7408834b51"
[[constraint]] [[constraint]]
name = "github.com/kata-containers/agent" name = "github.com/kata-containers/agent"

View File

@ -946,11 +946,13 @@ func (q *QMP) ExecutePCIVFIOMediatedDeviceAdd(ctx context.Context, devID, sysfsd
"id": devID, "id": devID,
"driver": "vfio-pci", "driver": "vfio-pci",
"sysfsdev": sysfsdev, "sysfsdev": sysfsdev,
"addr": addr,
} }
if bus != "" { if bus != "" {
args["bus"] = bus args["bus"] = bus
} }
if addr != "" {
args["addr"] = addr
}
return q.executeCommand(ctx, "device_add", args, nil) return q.executeCommand(ctx, "device_add", args, nil)
} }