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:
Sebastien Boeuf
2018-10-02 13:43:24 -07:00
parent 6ba3b3fad1
commit ef7250508c
2 changed files with 27 additions and 12 deletions

View File

@@ -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) {