mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 07:22:20 +00:00
bridge: Store the bridge address to state
We need to store the bridge address to state to use it for assigning addresses to devices attached to teh bridge. So we need to make sure that the bridge pointer is assigned the address. Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
parent
718dbd2a71
commit
85865f1a2c
@ -205,7 +205,7 @@ func (q *qemuAmd64) appendBridges(devices []govmmQemu.Device, bridges []Bridge)
|
||||
t = govmmQemu.PCIEBridge
|
||||
}
|
||||
|
||||
b.Addr = bridgePCIStartAddr + idx
|
||||
bridges[idx].Addr = bridgePCIStartAddr + idx
|
||||
|
||||
devices = append(devices,
|
||||
govmmQemu.BridgeDevice{
|
||||
@ -215,7 +215,7 @@ func (q *qemuAmd64) appendBridges(devices []govmmQemu.Device, bridges []Bridge)
|
||||
// Each bridge is required to be assigned a unique chassis id > 0
|
||||
Chassis: (idx + 1),
|
||||
SHPC: true,
|
||||
Addr: strconv.FormatInt(int64(b.Addr), 10),
|
||||
Addr: strconv.FormatInt(int64(bridges[idx].Addr), 10),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ func (q *qemuArchBase) appendBridges(devices []govmmQemu.Device, bridges []Bridg
|
||||
t = govmmQemu.PCIEBridge
|
||||
}
|
||||
|
||||
b.Addr = bridgePCIStartAddr + idx
|
||||
bridges[idx].Addr = bridgePCIStartAddr + idx
|
||||
|
||||
devices = append(devices,
|
||||
govmmQemu.BridgeDevice{
|
||||
@ -338,7 +338,7 @@ func (q *qemuArchBase) appendBridges(devices []govmmQemu.Device, bridges []Bridg
|
||||
// Each bridge is required to be assigned a unique chassis id > 0
|
||||
Chassis: (idx + 1),
|
||||
SHPC: true,
|
||||
Addr: strconv.FormatInt(int64(b.Addr), 10),
|
||||
Addr: strconv.FormatInt(int64(bridges[idx].Addr), 10),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user