mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-24 01:24:26 +01:00
govmm/qemu: Let IO/memory reservations be specified for bridge devices
This adds fields to BridgeDevice struct to allow qemu's io-reserve, mem-reserve and pref64-reserve properties to be set for PCI bridges. This is needed for Kata's upcoming change to ACPI hotplug. fixes #200 Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
@@ -486,6 +486,24 @@ func TestAppendPCIBridgeDevice(t *testing.T) {
|
||||
testAppend(bridge, devicePCIBridgeString, t)
|
||||
}
|
||||
|
||||
func TestAppendPCIBridgeDeviceWithReservations(t *testing.T) {
|
||||
|
||||
bridge := BridgeDevice{
|
||||
Type: PCIBridge,
|
||||
ID: "mybridge",
|
||||
Bus: "/pci-bus/pcie.0",
|
||||
Addr: "255",
|
||||
Chassis: 5,
|
||||
SHPC: false,
|
||||
ROMFile: romfile,
|
||||
IOReserve: "4k",
|
||||
MemReserve: "1m",
|
||||
Pref64Reserve: "1m",
|
||||
}
|
||||
|
||||
testAppend(bridge, devicePCIBridgeStringReserved, t)
|
||||
}
|
||||
|
||||
func TestAppendPCIEBridgeDevice(t *testing.T) {
|
||||
|
||||
bridge := BridgeDevice{
|
||||
|
||||
Reference in New Issue
Block a user