mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-05 23:44:21 +01:00
qemu: Fix the support of PCIe bridge
In case the type of bridge is PCIEBridge, which we expect as ending up using pcie-pci-bridge device from Qemu, the properties chassis_nr and shpc don't exist. This commit simply fixes this use case by removing those parameters from the command line. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -420,9 +420,9 @@ func TestAppendDeviceSCSIController(t *testing.T) {
|
||||
testAppend(scsiCon, deviceSCSIControllerBusAddrStr, t)
|
||||
}
|
||||
|
||||
var deviceBridgeString = "-device pci-bridge,bus=/pci-bus/pcie.0,id=mybridge,chassis_nr=5,shpc=on,addr=ff"
|
||||
var devicePCIBridgeString = "-device pci-bridge,bus=/pci-bus/pcie.0,id=mybridge,chassis_nr=5,shpc=on,addr=ff"
|
||||
|
||||
func TestAppendBridgeDevice(t *testing.T) {
|
||||
func TestAppendPCIBridgeDevice(t *testing.T) {
|
||||
|
||||
bridge := BridgeDevice{
|
||||
Type: PCIBridge,
|
||||
@@ -433,7 +433,21 @@ func TestAppendBridgeDevice(t *testing.T) {
|
||||
SHPC: true,
|
||||
}
|
||||
|
||||
testAppend(bridge, deviceBridgeString, t)
|
||||
testAppend(bridge, devicePCIBridgeString, t)
|
||||
}
|
||||
|
||||
var devicePCIEBridgeString = "-device pcie-pci-bridge,bus=/pci-bus/pcie.0,id=mybridge,addr=ff"
|
||||
|
||||
func TestAppendPCIEBridgeDevice(t *testing.T) {
|
||||
|
||||
bridge := BridgeDevice{
|
||||
Type: PCIEBridge,
|
||||
ID: "mybridge",
|
||||
Bus: "/pci-bus/pcie.0",
|
||||
Addr: "255",
|
||||
}
|
||||
|
||||
testAppend(bridge, devicePCIEBridgeString, t)
|
||||
}
|
||||
|
||||
func TestAppendEmptyDevice(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user