mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-24 13:44:08 +00:00
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:
10
vendor/github.com/intel/govmm/qemu/qemu.go
generated
vendored
10
vendor/github.com/intel/govmm/qemu/qemu.go
generated
vendored
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user