vendor: Vendor github.com/intel/govmm

This pulls in the following change to allow assigning
address to a bridge.

30aeacb qemu: Add qemu parameter for PCI address for a bridge.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
Archana Shinde
2018-04-13 16:05:17 -07:00
parent 1c7a02e73d
commit ee2e15c724
3 changed files with 13 additions and 3 deletions

View File

@@ -907,6 +907,9 @@ type BridgeDevice struct {
// SHPC is used to enable or disable the standard hot plug controller
SHPC bool
// PCI Slot
Addr string
}
// Valid returns true if the BridgeDevice structure is valid and complete.
@@ -941,6 +944,13 @@ func (bridgeDev BridgeDevice) QemuParams(config *Config) []string {
}
deviceParam := fmt.Sprintf("%s,bus=%s,id=%s,chassis_nr=%d,shpc=%s", deviceName, bridgeDev.Bus, bridgeDev.ID, bridgeDev.Chassis, shpc)
if bridgeDev.Addr != "" {
addr, err := strconv.Atoi(bridgeDev.Addr)
if err == nil && addr >= 0 {
deviceParam += fmt.Sprintf(",addr=%x", addr)
}
}
qemuParams = append(qemuParams, "-device")
qemuParams = append(qemuParams, deviceParam)