[libvirt] [PATCH 0/6] qemu: PCI-related bug fixes and cleanups

Patches 1-3 are straightforward code cleanups. Patch 4 is a massive reduction in the size of our test suite, achieved by removing legacy PCI controllers from test cases that don't need them. Patch 5 removes some incorrect assumptions that, for all intents and purposes, made the availablilty of pci-bridge mandatory even for guests that only used PCIe controllers and devices. Patch 6 reduces the test suite in size further by dropping the capabilities that are no longer required after patch 5: if you apply this patch before the previous one and run the test suite, you'll get a lot of failures. Andrea Bolognani (6): conf: Remove dead code qemu: Make switch statements more strict conf: Make switch statements more strict tests: Reduce usage of legacy PCI controllers on PCIe machines qemu: Allow multiple bridges when pci-bridges is not available tests: Reduce QEMU_CAPS_DEVICE_{DMI_TO_,}PCI_BRIDGE usage src/conf/domain_addr.c | 17 +- src/conf/domain_conf.c | 12 +- src/qemu/qemu_command.c | 23 +-- src/qemu/qemu_domain_address.c | 10 +- .../qemuxml2argv-boot-floppy-q35.args | 5 +- .../qemuxml2argv-boot-floppy-q35.xml | 10 +- .../qemuxml2argv-bootindex-floppy-q35.args | 5 +- .../qemuxml2argv-bootindex-floppy-q35.xml | 10 +- .../qemuxml2argv-intel-iommu-machine.args | 5 +- .../qemuxml2argv-intel-iommu-machine.xml | 13 +- .../qemuxml2argvdata/qemuxml2argv-intel-iommu.args | 5 +- .../qemuxml2argvdata/qemuxml2argv-intel-iommu.xml | 13 +- .../qemuxml2argv-pcie-expander-bus-bad-bus.xml | 18 +- .../qemuxml2argv-pcie-expander-bus.args | 136 ++++++------- .../qemuxml2argv-pcie-expander-bus.xml | 85 ++++---- .../qemuxml2argv-pcie-root-port-too-many.xml | 6 +- .../qemuxml2argv-pcie-root-port.args | 6 +- .../qemuxml2argv-pcie-root-port.xml | 6 +- .../qemuxml2argv-pcie-switch-downstream-port.args | 22 +- .../qemuxml2argv-pcie-switch-downstream-port.xml | 18 +- .../qemuxml2argv-pcie-switch-upstream-port.args | 10 +- .../qemuxml2argv-pcie-switch-upstream-port.xml | 10 +- .../qemuxml2argv-pcihole64-q35.args | 2 - .../qemuxml2argv-pcihole64-q35.xml | 2 - .../qemuxml2argv-q35-dmi-bad-address1.xml | 5 +- .../qemuxml2argv-q35-dmi-bad-address2.xml | 21 +- .../qemuxml2argv-q35-wrong-root.xml | 7 - tests/qemuxml2argvdata/qemuxml2argv-q35.args | 2 - tests/qemuxml2argvdata/qemuxml2argv-q35.xml | 7 - .../qemuxml2argv-usb-controller-default-q35.args | 2 - .../qemuxml2argv-usb-controller-default-q35.xml | 5 - .../qemuxml2argv-usb-controller-explicit-q35.args | 2 - .../qemuxml2argv-usb-controller-explicit-q35.xml | 5 - .../qemuxml2argv-vcpu-placement-static.xml | 6 - tests/qemuxml2argvtest.c | 83 ++------ .../qemuxml2xmlout-intel-iommu.xml | 13 +- .../qemuxml2xmlout-pcie-expander-bus.xml | 225 ++++++++++----------- .../qemuxml2xmlout-pcie-root-port.xml | 15 +- .../qemuxml2xmlout-pcie-switch-downstream-port.xml | 61 +++--- .../qemuxml2xmlout-pcie-switch-upstream-port.xml | 25 +-- .../qemuxml2xmlout-pcihole64-q35.xml | 9 - tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml | 9 - .../qemuxml2xmlout-usb-controller-default-q35.xml | 9 - .../qemuxml2xmlout-usb-controller-explicit-q35.xml | 9 - .../qemuxml2xmlout-vcpu-placement-static.xml | 9 - tests/qemuxml2xmltest.c | 56 ++--- 46 files changed, 354 insertions(+), 680 deletions(-) -- 2.7.4

The switch in virDomainPCIControllerModelToConnectType() had some code that, while techically part of the _PCIE_SWITCH_DOWNSTREAM_PORT case, was in fact dead due to the early return. Get rid of the dead code, and fix the inaccurate function description while at it. --- src/conf/domain_addr.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 1649d84..519cc6b 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -35,9 +35,8 @@ VIR_LOG_INIT("conf.domain_addr"); virDomainPCIConnectFlags virDomainPCIControllerModelToConnectType(virDomainControllerModelPCI model) { - /* given a VIR_DOMAIN_CONTROLLER_MODEL_PCI*, set connectType to - * the equivalent VIR_PCI_CONNECT_TYPE_*. return 0 on success, -1 - * if the model wasn't recognized. + /* given a VIR_DOMAIN_CONTROLLER_MODEL_PCI*, return + * the equivalent VIR_PCI_CONNECT_TYPE_*. */ switch (model) { case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: @@ -70,14 +69,6 @@ virDomainPCIControllerModelToConnectType(virDomainControllerModelPCI model) case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: return VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT; - - /* if this happens, there is an error in the code. A - * PCI controller should always have a proper model - * set - */ - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("PCI controller model incorrectly set to 'last'")); - return -1; } return 0; } -- 2.7.4

On 02/21/2017 02:57 PM, Andrea Bolognani wrote:
The switch in virDomainPCIControllerModelToConnectType() had some code that, while techically part of the _PCIE_SWITCH_DOWNSTREAM_PORT case, was in fact dead due to the early return.
Get rid of the dead code, and fix the inaccurate function description while at it. --- src/conf/domain_addr.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 1649d84..519cc6b 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -35,9 +35,8 @@ VIR_LOG_INIT("conf.domain_addr"); virDomainPCIConnectFlags virDomainPCIControllerModelToConnectType(virDomainControllerModelPCI model) { - /* given a VIR_DOMAIN_CONTROLLER_MODEL_PCI*, set connectType to - * the equivalent VIR_PCI_CONNECT_TYPE_*. return 0 on success, -1 - * if the model wasn't recognized. + /* given a VIR_DOMAIN_CONTROLLER_MODEL_PCI*, return + * the equivalent VIR_PCI_CONNECT_TYPE_*. */ switch (model) { case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: @@ -70,14 +69,6 @@ virDomainPCIControllerModelToConnectType(virDomainControllerModelPCI model)
case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: return VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_DOWNSTREAM_PORT; - - /* if this happens, there is an error in the code. A - * PCI controller should always have a proper model - * set - */ - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("PCI controller model incorrectly set to 'last'")); - return -1;
It looks like this code was added at a time when I thought that ..._LAST should be handled separately in order to catch errors where the model was improperly set to that one value, and then later I figured it was so unlikely for that to happen (vs. e.g. having it initialized to 0 and then never set) that it wasn't worth the code. So I moved the case ...._LAST: but forgot to remove the code. Anyway, ACK.

When switching over the values in the virDomainControllerModelPCI enumeration, make sure the proper cast is in place so that the compiler can warn us when the coverage is not exaustive. For the same reason, fold some unstructured checks (performed by comparing directly against some values in the enumeration) inside an existing switch statement. --- src/qemu/qemu_command.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 552fdcf..f0b938f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2664,19 +2664,13 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, break; case VIR_DOMAIN_CONTROLLER_TYPE_PCI: - if (def->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT || - def->model == VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("wrong function called for pci-root/pcie-root")); - return NULL; - } if (def->idx == 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("index for pci controllers of model '%s' must be > 0"), virDomainControllerModelPCITypeToString(def->model)); goto error; } - switch (def->model) { + switch ((virDomainControllerModelPCI) def->model) { case VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE: if (def->opts.pciopts.modelName == VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE || @@ -2917,6 +2911,12 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, virBufferAsprintf(&buf, ",numa_node=%d", def->opts.pciopts.numaNode); break; + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("wrong function called")); + goto error; } break; @@ -6501,7 +6501,7 @@ qemuBuildGlobalControllerCommandLine(virCommandPtr cmd, bool cap = false; bool machine = false; - switch (cont->model) { + switch ((virDomainControllerModelPCI) cont->model) { case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT: hoststr = "i440FX-pcihost"; cap = virQEMUCapsGet(qemuCaps, QEMU_CAPS_I440FX_PCI_HOLE64_SIZE); -- 2.7.4

On 02/21/2017 02:57 PM, Andrea Bolognani wrote:
When switching over the values in the virDomainControllerModelPCI enumeration, make sure the proper cast is in place so that the compiler can warn us when the coverage is not exaustive.
For the same reason, fold some unstructured checks (performed by comparing directly against some values in the enumeration) inside an existing switch statement. --- src/qemu/qemu_command.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 552fdcf..f0b938f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2664,19 +2664,13 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, break;
case VIR_DOMAIN_CONTROLLER_TYPE_PCI: - if (def->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT || - def->model == VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("wrong function called for pci-root/pcie-root")); - return NULL; - }
It makes sense that the above code would never happen (certainly one of the two current callers to qemuBuildControllerDevStr() guarantees that it won't happen by skipping the call in that case), but how much do you want to trues the caller.
if (def->idx == 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("index for pci controllers of model '%s' must be > 0"), virDomainControllerModelPCITypeToString(def->model)); goto error; } - switch (def->model) { + switch ((virDomainControllerModelPCI) def->model) { case VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE: if (def->opts.pciopts.modelName == VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE || @@ -2917,6 +2911,12 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, virBufferAsprintf(&buf, ",numa_node=%d", def->opts.pciopts.numaNode); break; + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("wrong function called"));
Actually it will probably never get to here, because the code above where you removed this check also checks to be sure that def->idx != 0 (and for root controllers it always does, unless the user has manually altered it). So instead of getting a "wrong function called" log, you would probably get the incorrect "index for pci controllers of model "pci[e]-root" must be > 0". You can solve this by putting the "if (def->idx == 0)" check down just below the "switch (def->model)". ACK with that change.
+ goto error; } break;
@@ -6501,7 +6501,7 @@ qemuBuildGlobalControllerCommandLine(virCommandPtr cmd, bool cap = false; bool machine = false;
- switch (cont->model) { + switch ((virDomainControllerModelPCI) cont->model) { case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT: hoststr = "i440FX-pcihost"; cap = virQEMUCapsGet(qemuCaps, QEMU_CAPS_I440FX_PCI_HOLE64_SIZE);

On Tue, 2017-02-21 at 15:26 -0500, Laine Stump wrote:
@@ -2664,19 +2664,13 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, break; case VIR_DOMAIN_CONTROLLER_TYPE_PCI: - if (def->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT || - def->model == VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("wrong function called for pci-root/pcie-root")); - return NULL; - } It makes sense that the above code would never happen (certainly one of the two current callers to qemuBuildControllerDevStr() guarantees that it won't happen by skipping the call in that case), but how much do you want to trues the caller.
Not at all! That's why I didn't drop the check but merely moved it ;)
@@ -2917,6 +2911,12 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef, virBufferAsprintf(&buf, ",numa_node=%d", def->opts.pciopts.numaNode); break; + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("wrong function called")); Actually it will probably never get to here, because the code above where you removed this check also checks to be sure that def->idx != 0 (and for root controllers it always does, unless the user has manually altered it). So instead of getting a "wrong function called" log, you would probably get the incorrect "index for pci controllers of model "pci[e]-root" must be > 0". You can solve this by putting the "if (def->idx == 0)" check down just below the "switch (def->model)".
Makes sense. -- Andrea Bolognani / Red Hat / Virtualization

When switching over the values in the virDomainControllerModelPCI enumeration, make sure the proper cast is in place so that the compiler can warn us when the coverage is not exaustive. For the same reason, remove the 'default' case from one of the existing switch statements. --- src/conf/domain_addr.c | 4 ++-- src/conf/domain_conf.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 519cc6b..933c2fe 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -344,9 +344,9 @@ virDomainPCIAddressBusSetModel(virDomainPCIAddressBusPtr bus, bus->maxSlot = VIR_PCI_ADDRESS_SLOT_LAST; break; - default: + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid PCI controller model %d"), model); + _("PCI controller model was not set correctly")); return -1; } diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 79bdbdf..3ac8467 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8834,7 +8834,7 @@ virDomainControllerDefParseXML(xmlNodePtr node, break; } case VIR_DOMAIN_CONTROLLER_TYPE_PCI: - switch (def->model) { + switch ((virDomainControllerModelPCI) def->model) { case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: { unsigned long long bytes; @@ -8859,6 +8859,16 @@ virDomainControllerDefParseXML(xmlNodePtr node, def->opts.pciopts.pcihole64 = true; def->opts.pciopts.pcihole64size = VIR_DIV_UP(bytes, 1024); } + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE: + case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS: + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: + /* Other controller models don't require extra checks */ + break; } if (modelName && (def->opts.pciopts.modelName -- 2.7.4

On 02/21/2017 02:57 PM, Andrea Bolognani wrote:
When switching over the values in the virDomainControllerModelPCI enumeration, make sure the proper cast is in place so that the compiler can warn us when the coverage is not exaustive.
For the same reason, remove the 'default' case from one of the existing switch statements. --- src/conf/domain_addr.c | 4 ++-- src/conf/domain_conf.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 519cc6b..933c2fe 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -344,9 +344,9 @@ virDomainPCIAddressBusSetModel(virDomainPCIAddressBusPtr bus, bus->maxSlot = VIR_PCI_ADDRESS_SLOT_LAST; break;
- default: + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid PCI controller model %d"), model); + _("PCI controller model was not set correctly"));
You're going to need to precede the string with "%s", to avoid a syntax-check failure. ACK with that fixed.

On Wed, 2017-02-22 at 09:40 -0500, Laine Stump wrote: [...]
virReportError(VIR_ERR_INTERNAL_ERROR, - _("Invalid PCI controller model %d"), model); + _("PCI controller model was not set correctly")); You're going to need to precede the string with "%s", to avoid a syntax-check failure.
I somehow forgot to run the usual "check && syntax-check" loop before submitting the series, thanks for spotting this! -- Andrea Bolognani / Red Hat / Virtualization

Up until a while ago, libvirt would automatically add a legacy PCI controllers combo (dmi-to-pci-bridge + pci-bridge) to any PCIe machine type (x86_64/q35 and aarch64/virt). As a result, a number of input and output files in the test suite ended up containing the legacy PCI controllers, even though they are not needed or in any way relevant to the feature being tested. Get rid of most of the occurrences. Most of the time, this just means removing the controllers from the input file and regenerating the output files; in a few instances, some minor tweaking is performed on the input file, most notably removing the memory balloon: as memory balloon support was not the scope of the test being changed, there is no loss of test coverage from doing so. Several occurrences of the legacy PCI controllers remain in the test suite, both because removing their usage would have required even more tweaking, and because we still want to have coverage of this perfectly valid combination. --- .../qemuxml2argv-boot-floppy-q35.args | 5 +- .../qemuxml2argv-boot-floppy-q35.xml | 10 +- .../qemuxml2argv-bootindex-floppy-q35.args | 5 +- .../qemuxml2argv-bootindex-floppy-q35.xml | 10 +- .../qemuxml2argv-intel-iommu-machine.args | 5 +- .../qemuxml2argv-intel-iommu-machine.xml | 13 +- .../qemuxml2argvdata/qemuxml2argv-intel-iommu.args | 5 +- .../qemuxml2argvdata/qemuxml2argv-intel-iommu.xml | 13 +- .../qemuxml2argv-pcie-expander-bus-bad-bus.xml | 18 +- .../qemuxml2argv-pcie-expander-bus.args | 136 ++++++------- .../qemuxml2argv-pcie-expander-bus.xml | 85 ++++---- .../qemuxml2argv-pcie-root-port-too-many.xml | 6 +- .../qemuxml2argv-pcie-root-port.args | 6 +- .../qemuxml2argv-pcie-root-port.xml | 6 +- .../qemuxml2argv-pcie-switch-downstream-port.args | 22 +- .../qemuxml2argv-pcie-switch-downstream-port.xml | 18 +- .../qemuxml2argv-pcie-switch-upstream-port.args | 10 +- .../qemuxml2argv-pcie-switch-upstream-port.xml | 10 +- .../qemuxml2argv-pcihole64-q35.args | 2 - .../qemuxml2argv-pcihole64-q35.xml | 2 - .../qemuxml2argv-q35-dmi-bad-address1.xml | 5 +- .../qemuxml2argv-q35-dmi-bad-address2.xml | 21 +- .../qemuxml2argv-q35-wrong-root.xml | 7 - tests/qemuxml2argvdata/qemuxml2argv-q35.args | 2 - tests/qemuxml2argvdata/qemuxml2argv-q35.xml | 7 - .../qemuxml2argv-usb-controller-default-q35.args | 2 - .../qemuxml2argv-usb-controller-default-q35.xml | 5 - .../qemuxml2argv-usb-controller-explicit-q35.args | 2 - .../qemuxml2argv-usb-controller-explicit-q35.xml | 5 - .../qemuxml2argv-vcpu-placement-static.xml | 6 - .../qemuxml2xmlout-intel-iommu.xml | 13 +- .../qemuxml2xmlout-pcie-expander-bus.xml | 225 ++++++++++----------- .../qemuxml2xmlout-pcie-root-port.xml | 15 +- .../qemuxml2xmlout-pcie-switch-downstream-port.xml | 61 +++--- .../qemuxml2xmlout-pcie-switch-upstream-port.xml | 25 +-- .../qemuxml2xmlout-pcihole64-q35.xml | 9 - tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml | 9 - .../qemuxml2xmlout-usb-controller-default-q35.xml | 9 - .../qemuxml2xmlout-usb-controller-explicit-q35.xml | 9 - .../qemuxml2xmlout-vcpu-placement-static.xml | 9 - 40 files changed, 300 insertions(+), 533 deletions(-) diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy-q35.args b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy-q35.args index b9c6126..caaf758 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy-q35.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy-q35.args @@ -16,8 +16,5 @@ QEMU_AUDIO_DRV=none \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ -no-acpi \ -boot a \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x1 \ -drive file=/tmp/firmware.img,format=raw,if=none,id=drive-fdc0-0-0 \ --device isa-fdc,driveA=drive-fdc0-0-0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x3 +-device isa-fdc,driveA=drive-fdc0-0-0 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy-q35.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy-q35.xml index 70d3262..b94ad85 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy-q35.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy-q35.xml @@ -24,17 +24,9 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> - </controller> <controller type='fdc' index='0'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> - </memballoon> + <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bootindex-floppy-q35.args b/tests/qemuxml2argvdata/qemuxml2argv-bootindex-floppy-q35.args index 8bcdc1f..10ae65e 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-bootindex-floppy-q35.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-bootindex-floppy-q35.args @@ -15,8 +15,5 @@ QEMU_AUDIO_DRV=none \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ -no-acpi \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x1 \ -drive file=/tmp/firmware.img,format=raw,if=none,id=drive-fdc0-0-0 \ --device isa-fdc,driveA=drive-fdc0-0-0,bootindexA=1 \ --device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x3 +-device isa-fdc,driveA=drive-fdc0-0-0,bootindexA=1 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-bootindex-floppy-q35.xml b/tests/qemuxml2argvdata/qemuxml2argv-bootindex-floppy-q35.xml index 70d3262..b94ad85 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-bootindex-floppy-q35.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-bootindex-floppy-q35.xml @@ -24,17 +24,9 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> - </controller> <controller type='fdc' index='0'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> - </memballoon> + <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-machine.args b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-machine.args index 9221b79..91e37e3 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-machine.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-machine.args @@ -15,7 +15,4 @@ QEMU_AUDIO_DRV=none \ -nodefaults \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ -no-acpi \ --boot c \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x1 +-boot c diff --git a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-machine.xml b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-machine.xml index b5b2b51..de921f6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-machine.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-machine.xml @@ -15,23 +15,12 @@ <devices> <emulator>/usr/bin/qemu</emulator> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> - </memballoon> + <memballoon model='none'/> <iommu model='intel'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu.args b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu.args index fc64405..dfc2183 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu.args @@ -16,7 +16,4 @@ QEMU_AUDIO_DRV=none \ -monitor unix:/tmp/lib/domain--1-QEMUGuest1/monitor.sock,server,nowait \ -no-acpi \ -boot c \ --device intel-iommu \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x1 +-device intel-iommu diff --git a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu.xml b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu.xml index b5b2b51..de921f6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-intel-iommu.xml @@ -15,23 +15,12 @@ <devices> <emulator>/usr/bin/qemu</emulator> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> - </memballoon> + <memballoon model='none'/> <iommu model='intel'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus-bad-bus.xml b/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus-bad-bus.xml index 0305f35..4f4b0e6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus-bad-bus.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus-bad-bus.xml @@ -27,21 +27,9 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='56'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'> - <target busNr='220'> - <node>1</node> - </target> - <address type='pci' bus='0x00'/> - </controller> - <controller type='pci' index='4' model='pcie-expander-bus'> - <address type='pci' bus='3'/> + <controller type='pci' index='1' model='pcie-root-port'/> + <controller type='pci' index='2' model='pcie-expander-bus'> + <address type='pci' bus='1'/> </controller> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.args b/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.args index 7ce957c..92199ee 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.args @@ -19,106 +19,104 @@ QEMU_AUDIO_DRV=none \ nowait \ -no-acpi \ -boot c \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x0 \ --device pxb-pcie,bus_nr=254,id=pci.3,numa_node=0,bus=pcie.0,addr=0x4 \ --device ioh3420,port=0x0,chassis=4,id=pci.4,bus=pci.3,addr=0x0 \ --device x3130-upstream,id=pci.5,bus=pci.4,addr=0x0 \ --device xio3130-downstream,port=0x0,chassis=6,id=pci.6,bus=pci.5,addr=0x0 \ --device xio3130-downstream,port=0x1,chassis=7,id=pci.7,bus=pci.5,addr=0x1 \ --device xio3130-downstream,port=0x2,chassis=8,id=pci.8,bus=pci.5,addr=0x2 \ --device xio3130-downstream,port=0x3,chassis=9,id=pci.9,bus=pci.5,addr=0x3 \ --device xio3130-downstream,port=0x4,chassis=10,id=pci.10,bus=pci.5,addr=0x4 \ --device xio3130-downstream,port=0x5,chassis=11,id=pci.11,bus=pci.5,addr=0x5 \ --device xio3130-downstream,port=0x6,chassis=12,id=pci.12,bus=pci.5,addr=0x6 \ --device xio3130-downstream,port=0x7,chassis=13,id=pci.13,bus=pci.5,addr=0x7 \ --device xio3130-downstream,port=0x8,chassis=14,id=pci.14,bus=pci.5,addr=0x8 \ --device xio3130-downstream,port=0x9,chassis=15,id=pci.15,bus=pci.5,addr=0x9 \ --device xio3130-downstream,port=0xa,chassis=16,id=pci.16,bus=pci.5,addr=0xa \ --device xio3130-downstream,port=0xb,chassis=17,id=pci.17,bus=pci.5,addr=0xb \ --device xio3130-downstream,port=0xc,chassis=18,id=pci.18,bus=pci.5,addr=0xc \ --device xio3130-downstream,port=0xd,chassis=19,id=pci.19,bus=pci.5,addr=0xd \ --device xio3130-downstream,port=0xe,chassis=20,id=pci.20,bus=pci.5,addr=0xe \ --device xio3130-downstream,port=0xf,chassis=21,id=pci.21,bus=pci.5,addr=0xf \ --device xio3130-downstream,port=0x10,chassis=22,id=pci.22,bus=pci.5,addr=0x10 \ --device xio3130-downstream,port=0x11,chassis=23,id=pci.23,bus=pci.5,addr=0x11 \ --device xio3130-downstream,port=0x12,chassis=24,id=pci.24,bus=pci.5,addr=0x12 \ --device xio3130-downstream,port=0x13,chassis=25,id=pci.25,bus=pci.5,addr=0x13 \ --device xio3130-downstream,port=0x14,chassis=26,id=pci.26,bus=pci.5,addr=0x14 \ --device xio3130-downstream,port=0x15,chassis=27,id=pci.27,bus=pci.5,addr=0x15 \ --device xio3130-downstream,port=0x16,chassis=28,id=pci.28,bus=pci.5,addr=0x16 \ --device xio3130-downstream,port=0x17,chassis=29,id=pci.29,bus=pci.5,addr=0x17 \ --device xio3130-downstream,port=0x18,chassis=30,id=pci.30,bus=pci.5,addr=0x18 \ --device xio3130-downstream,port=0x19,chassis=31,id=pci.31,bus=pci.5,addr=0x19 \ --device xio3130-downstream,port=0x1a,chassis=32,id=pci.32,bus=pci.5,addr=0x1a \ --device xio3130-downstream,port=0x1b,chassis=33,id=pci.33,bus=pci.5,addr=0x1b \ --device xio3130-downstream,port=0x1c,chassis=34,id=pci.34,bus=pci.5,addr=0x1c \ --device xio3130-downstream,port=0x1d,chassis=35,id=pci.35,bus=pci.5,addr=0x1d \ --device xio3130-downstream,port=0x1e,chassis=36,id=pci.36,bus=pci.5,addr=0x1e \ --device xio3130-downstream,port=0x1f,chassis=37,id=pci.37,bus=pci.5,addr=0x1f \ +-device pxb-pcie,bus_nr=254,id=pci.1,numa_node=0,bus=pcie.0,addr=0x4 \ +-device ioh3420,port=0x0,chassis=2,id=pci.2,bus=pci.1,addr=0x0 \ +-device x3130-upstream,id=pci.3,bus=pci.2,addr=0x0 \ +-device xio3130-downstream,port=0x0,chassis=4,id=pci.4,bus=pci.3,addr=0x0 \ +-device xio3130-downstream,port=0x1,chassis=5,id=pci.5,bus=pci.3,addr=0x1 \ +-device xio3130-downstream,port=0x2,chassis=6,id=pci.6,bus=pci.3,addr=0x2 \ +-device xio3130-downstream,port=0x3,chassis=7,id=pci.7,bus=pci.3,addr=0x3 \ +-device xio3130-downstream,port=0x4,chassis=8,id=pci.8,bus=pci.3,addr=0x4 \ +-device xio3130-downstream,port=0x5,chassis=9,id=pci.9,bus=pci.3,addr=0x5 \ +-device xio3130-downstream,port=0x6,chassis=10,id=pci.10,bus=pci.3,addr=0x6 \ +-device xio3130-downstream,port=0x7,chassis=11,id=pci.11,bus=pci.3,addr=0x7 \ +-device xio3130-downstream,port=0x8,chassis=12,id=pci.12,bus=pci.3,addr=0x8 \ +-device xio3130-downstream,port=0x9,chassis=13,id=pci.13,bus=pci.3,addr=0x9 \ +-device xio3130-downstream,port=0xa,chassis=14,id=pci.14,bus=pci.3,addr=0xa \ +-device xio3130-downstream,port=0xb,chassis=15,id=pci.15,bus=pci.3,addr=0xb \ +-device xio3130-downstream,port=0xc,chassis=16,id=pci.16,bus=pci.3,addr=0xc \ +-device xio3130-downstream,port=0xd,chassis=17,id=pci.17,bus=pci.3,addr=0xd \ +-device xio3130-downstream,port=0xe,chassis=18,id=pci.18,bus=pci.3,addr=0xe \ +-device xio3130-downstream,port=0xf,chassis=19,id=pci.19,bus=pci.3,addr=0xf \ +-device xio3130-downstream,port=0x10,chassis=20,id=pci.20,bus=pci.3,addr=0x10 \ +-device xio3130-downstream,port=0x11,chassis=21,id=pci.21,bus=pci.3,addr=0x11 \ +-device xio3130-downstream,port=0x12,chassis=22,id=pci.22,bus=pci.3,addr=0x12 \ +-device xio3130-downstream,port=0x13,chassis=23,id=pci.23,bus=pci.3,addr=0x13 \ +-device xio3130-downstream,port=0x14,chassis=24,id=pci.24,bus=pci.3,addr=0x14 \ +-device xio3130-downstream,port=0x15,chassis=25,id=pci.25,bus=pci.3,addr=0x15 \ +-device xio3130-downstream,port=0x16,chassis=26,id=pci.26,bus=pci.3,addr=0x16 \ +-device xio3130-downstream,port=0x17,chassis=27,id=pci.27,bus=pci.3,addr=0x17 \ +-device xio3130-downstream,port=0x18,chassis=28,id=pci.28,bus=pci.3,addr=0x18 \ +-device xio3130-downstream,port=0x19,chassis=29,id=pci.29,bus=pci.3,addr=0x19 \ +-device xio3130-downstream,port=0x1a,chassis=30,id=pci.30,bus=pci.3,addr=0x1a \ +-device xio3130-downstream,port=0x1b,chassis=31,id=pci.31,bus=pci.3,addr=0x1b \ +-device xio3130-downstream,port=0x1c,chassis=32,id=pci.32,bus=pci.3,addr=0x1c \ +-device xio3130-downstream,port=0x1d,chassis=33,id=pci.33,bus=pci.3,addr=0x1d \ +-device xio3130-downstream,port=0x1e,chassis=34,id=pci.34,bus=pci.3,addr=0x1e \ +-device xio3130-downstream,port=0x1f,chassis=35,id=pci.35,bus=pci.3,addr=0x1f \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \ -device ide-drive,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0 \ --device rtl8139,vlan=0,id=net0,mac=52:54:00:f1:95:51,bus=pci.6,addr=0x0 \ +-device rtl8139,vlan=0,id=net0,mac=52:54:00:f1:95:51,bus=pci.4,addr=0x0 \ -net user,vlan=0,name=hostnet0 \ --device e1000,vlan=1,id=net1,mac=52:54:00:5c:c6:1a,bus=pci.7,addr=0x0 \ +-device e1000,vlan=1,id=net1,mac=52:54:00:5c:c6:1a,bus=pci.5,addr=0x0 \ -net user,vlan=1,name=hostnet1 \ --device e1000,vlan=2,id=net2,mac=52:54:00:39:97:ac,bus=pci.8,addr=0x0 \ +-device e1000,vlan=2,id=net2,mac=52:54:00:39:97:ac,bus=pci.6,addr=0x0 \ -net user,vlan=2,name=hostnet2 \ --device e1000,vlan=3,id=net3,mac=52:54:00:ee:b9:a8,bus=pci.9,addr=0x0 \ +-device e1000,vlan=3,id=net3,mac=52:54:00:ee:b9:a8,bus=pci.7,addr=0x0 \ -net user,vlan=3,name=hostnet3 \ --device e1000,vlan=4,id=net4,mac=52:54:00:a9:f7:17,bus=pci.10,addr=0x0 \ +-device e1000,vlan=4,id=net4,mac=52:54:00:a9:f7:17,bus=pci.8,addr=0x0 \ -net user,vlan=4,name=hostnet4 \ --device e1000,vlan=5,id=net5,mac=52:54:00:df:2b:f3,bus=pci.11,addr=0x0 \ +-device e1000,vlan=5,id=net5,mac=52:54:00:df:2b:f3,bus=pci.9,addr=0x0 \ -net user,vlan=5,name=hostnet5 \ --device e1000,vlan=6,id=net6,mac=52:54:00:78:94:b4,bus=pci.12,addr=0x0 \ +-device e1000,vlan=6,id=net6,mac=52:54:00:78:94:b4,bus=pci.10,addr=0x0 \ -net user,vlan=6,name=hostnet6 \ --device e1000,vlan=7,id=net7,mac=52:54:00:6b:9b:06,bus=pci.13,addr=0x0 \ +-device e1000,vlan=7,id=net7,mac=52:54:00:6b:9b:06,bus=pci.11,addr=0x0 \ -net user,vlan=7,name=hostnet7 \ --device e1000,vlan=8,id=net8,mac=52:54:00:17:df:bc,bus=pci.14,addr=0x0 \ +-device e1000,vlan=8,id=net8,mac=52:54:00:17:df:bc,bus=pci.12,addr=0x0 \ -net user,vlan=8,name=hostnet8 \ --device e1000,vlan=9,id=net9,mac=52:54:00:3b:d0:51,bus=pci.15,addr=0x0 \ +-device e1000,vlan=9,id=net9,mac=52:54:00:3b:d0:51,bus=pci.13,addr=0x0 \ -net user,vlan=9,name=hostnet9 \ --device e1000,vlan=10,id=net10,mac=52:54:00:8d:2d:17,bus=pci.16,addr=0x0 \ +-device e1000,vlan=10,id=net10,mac=52:54:00:8d:2d:17,bus=pci.14,addr=0x0 \ -net user,vlan=10,name=hostnet10 \ --device e1000,vlan=11,id=net11,mac=52:54:00:a7:66:af,bus=pci.17,addr=0x0 \ +-device e1000,vlan=11,id=net11,mac=52:54:00:a7:66:af,bus=pci.15,addr=0x0 \ -net user,vlan=11,name=hostnet11 \ --device e1000,vlan=12,id=net12,mac=52:54:00:54:ab:d7,bus=pci.18,addr=0x0 \ +-device e1000,vlan=12,id=net12,mac=52:54:00:54:ab:d7,bus=pci.16,addr=0x0 \ -net user,vlan=12,name=hostnet12 \ --device e1000,vlan=13,id=net13,mac=52:54:00:1f:99:90,bus=pci.19,addr=0x0 \ +-device e1000,vlan=13,id=net13,mac=52:54:00:1f:99:90,bus=pci.17,addr=0x0 \ -net user,vlan=13,name=hostnet13 \ --device e1000,vlan=14,id=net14,mac=52:54:00:c8:43:87,bus=pci.20,addr=0x0 \ +-device e1000,vlan=14,id=net14,mac=52:54:00:c8:43:87,bus=pci.18,addr=0x0 \ -net user,vlan=14,name=hostnet14 \ --device e1000,vlan=15,id=net15,mac=52:54:00:df:22:b2,bus=pci.21,addr=0x0 \ +-device e1000,vlan=15,id=net15,mac=52:54:00:df:22:b2,bus=pci.19,addr=0x0 \ -net user,vlan=15,name=hostnet15 \ --device e1000,vlan=16,id=net16,mac=52:54:00:d2:9a:47,bus=pci.22,addr=0x0 \ +-device e1000,vlan=16,id=net16,mac=52:54:00:d2:9a:47,bus=pci.20,addr=0x0 \ -net user,vlan=16,name=hostnet16 \ --device e1000,vlan=17,id=net17,mac=52:54:00:86:05:e2,bus=pci.23,addr=0x0 \ +-device e1000,vlan=17,id=net17,mac=52:54:00:86:05:e2,bus=pci.21,addr=0x0 \ -net user,vlan=17,name=hostnet17 \ --device e1000,vlan=18,id=net18,mac=52:54:00:8c:1c:c2,bus=pci.24,addr=0x0 \ +-device e1000,vlan=18,id=net18,mac=52:54:00:8c:1c:c2,bus=pci.22,addr=0x0 \ -net user,vlan=18,name=hostnet18 \ --device e1000,vlan=19,id=net19,mac=52:54:00:48:58:92,bus=pci.25,addr=0x0 \ +-device e1000,vlan=19,id=net19,mac=52:54:00:48:58:92,bus=pci.23,addr=0x0 \ -net user,vlan=19,name=hostnet19 \ --device e1000,vlan=20,id=net20,mac=52:54:00:99:e5:bf,bus=pci.26,addr=0x0 \ +-device e1000,vlan=20,id=net20,mac=52:54:00:99:e5:bf,bus=pci.24,addr=0x0 \ -net user,vlan=20,name=hostnet20 \ --device e1000,vlan=21,id=net21,mac=52:54:00:b1:8c:25,bus=pci.27,addr=0x0 \ +-device e1000,vlan=21,id=net21,mac=52:54:00:b1:8c:25,bus=pci.25,addr=0x0 \ -net user,vlan=21,name=hostnet21 \ --device e1000,vlan=22,id=net22,mac=52:54:00:60:e0:d0,bus=pci.28,addr=0x0 \ +-device e1000,vlan=22,id=net22,mac=52:54:00:60:e0:d0,bus=pci.26,addr=0x0 \ -net user,vlan=22,name=hostnet22 \ --device e1000,vlan=23,id=net23,mac=52:54:00:37:00:6a,bus=pci.29,addr=0x0 \ +-device e1000,vlan=23,id=net23,mac=52:54:00:37:00:6a,bus=pci.27,addr=0x0 \ -net user,vlan=23,name=hostnet23 \ --device e1000,vlan=24,id=net24,mac=52:54:00:c7:c8:ad,bus=pci.30,addr=0x0 \ +-device e1000,vlan=24,id=net24,mac=52:54:00:c7:c8:ad,bus=pci.28,addr=0x0 \ -net user,vlan=24,name=hostnet24 \ --device e1000,vlan=25,id=net25,mac=52:54:00:4e:a7:cf,bus=pci.31,addr=0x0 \ +-device e1000,vlan=25,id=net25,mac=52:54:00:4e:a7:cf,bus=pci.29,addr=0x0 \ -net user,vlan=25,name=hostnet25 \ --device e1000,vlan=26,id=net26,mac=52:54:00:00:79:69,bus=pci.32,addr=0x0 \ +-device e1000,vlan=26,id=net26,mac=52:54:00:00:79:69,bus=pci.30,addr=0x0 \ -net user,vlan=26,name=hostnet26 \ --device e1000,vlan=27,id=net27,mac=52:54:00:47:00:6f,bus=pci.33,addr=0x0 \ +-device e1000,vlan=27,id=net27,mac=52:54:00:47:00:6f,bus=pci.31,addr=0x0 \ -net user,vlan=27,name=hostnet27 \ --device e1000,vlan=28,id=net28,mac=52:54:00:2a:8c:8b,bus=pci.34,addr=0x0 \ +-device e1000,vlan=28,id=net28,mac=52:54:00:2a:8c:8b,bus=pci.32,addr=0x0 \ -net user,vlan=28,name=hostnet28 \ --device e1000,vlan=29,id=net29,mac=52:54:00:ec:d5:e3,bus=pci.35,addr=0x0 \ +-device e1000,vlan=29,id=net29,mac=52:54:00:ec:d5:e3,bus=pci.33,addr=0x0 \ -net user,vlan=29,name=hostnet29 \ --device e1000,vlan=30,id=net30,mac=52:54:00:7e:6e:c8,bus=pci.36,addr=0x0 \ +-device e1000,vlan=30,id=net30,mac=52:54:00:7e:6e:c8,bus=pci.34,addr=0x0 \ -net user,vlan=30,name=hostnet30 \ --device e1000,vlan=31,id=net31,mac=52:54:00:7e:6d:c9,bus=pci.37,addr=0x0 \ +-device e1000,vlan=31,id=net31,mac=52:54:00:7e:6d:c9,bus=pci.35,addr=0x0 \ -net user,vlan=31,name=hostnet31 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.xml b/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.xml index 72681ce..80f2ea6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-expander-bus.xml @@ -27,29 +27,24 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='56'/> - </controller> - <controller type='pci' index='3' model='pcie-expander-bus'> + <controller type='pci' index='1' model='pcie-expander-bus'> <model name='pxb-pcie'/> <target busNr='254'> <node>0</node> </target> <address type='pci' bus='0x00' slot='4'/> </controller> - <controller type='pci' index='4' model='pcie-root-port'> + <controller type='pci' index='2' model='pcie-root-port'> <target busNr='220'> <node>1</node> </target> - <address type='pci' bus='0x03'/> + <address type='pci' bus='0x01'/> </controller> - <controller type='pci' index='5' model='pcie-switch-upstream-port'> - <address type='pci' bus='0x04'/> + <controller type='pci' index='3' model='pcie-switch-upstream-port'> + <address type='pci' bus='0x02'/> </controller> + <controller type='pci' index='4' model='pcie-switch-downstream-port'/> + <controller type='pci' index='5' model='pcie-switch-downstream-port'/> <controller type='pci' index='6' model='pcie-switch-downstream-port'/> <controller type='pci' index='7' model='pcie-switch-downstream-port'/> <controller type='pci' index='8' model='pcie-switch-downstream-port'/> @@ -80,167 +75,165 @@ <controller type='pci' index='33' model='pcie-switch-downstream-port'/> <controller type='pci' index='34' model='pcie-switch-downstream-port'/> <controller type='pci' index='35' model='pcie-switch-downstream-port'/> - <controller type='pci' index='36' model='pcie-switch-downstream-port'/> - <controller type='pci' index='37' model='pcie-switch-downstream-port'/> <interface type='user'> <mac address='52:54:00:f1:95:51'/> <model type='rtl8139'/> - <address type='pci' bus='6'/> + <address type='pci' bus='4'/> </interface> <interface type='user'> <mac address='52:54:00:5c:c6:1a'/> <model type='e1000'/> - <address type='pci' bus='07'/> + <address type='pci' bus='5'/> </interface> <interface type='user'> <mac address='52:54:00:39:97:ac'/> <model type='e1000'/> - <address type='pci' bus='8'/> + <address type='pci' bus='6'/> </interface> <interface type='user'> <mac address='52:54:00:ee:b9:a8'/> <model type='e1000'/> - <address type='pci' bus='9'/> + <address type='pci' bus='7'/> </interface> <interface type='user'> <mac address='52:54:00:a9:f7:17'/> <model type='e1000'/> - <address type='pci' bus='10'/> + <address type='pci' bus='8'/> </interface> <interface type='user'> <mac address='52:54:00:df:2b:f3'/> <model type='e1000'/> - <address type='pci' bus='11'/> + <address type='pci' bus='9'/> </interface> <interface type='user'> <mac address='52:54:00:78:94:b4'/> <model type='e1000'/> - <address type='pci' bus='12'/> + <address type='pci' bus='10'/> </interface> <interface type='user'> <mac address='52:54:00:6b:9b:06'/> <model type='e1000'/> - <address type='pci' bus='13'/> + <address type='pci' bus='11'/> </interface> <interface type='user'> <mac address='52:54:00:17:df:bc'/> <model type='e1000'/> - <address type='pci' bus='14'/> + <address type='pci' bus='12'/> </interface> <interface type='user'> <mac address='52:54:00:3b:d0:51'/> <model type='e1000'/> - <address type='pci' bus='15'/> + <address type='pci' bus='13'/> </interface> <interface type='user'> <mac address='52:54:00:8d:2d:17'/> <model type='e1000'/> - <address type='pci' bus='16'/> + <address type='pci' bus='14'/> </interface> <interface type='user'> <mac address='52:54:00:a7:66:af'/> <model type='e1000'/> - <address type='pci' bus='17'/> + <address type='pci' bus='15'/> </interface> <interface type='user'> <mac address='52:54:00:54:ab:d7'/> <model type='e1000'/> - <address type='pci' bus='18'/> + <address type='pci' bus='16'/> </interface> <interface type='user'> <mac address='52:54:00:1f:99:90'/> <model type='e1000'/> - <address type='pci' bus='19'/> + <address type='pci' bus='17'/> </interface> <interface type='user'> <mac address='52:54:00:c8:43:87'/> <model type='e1000'/> - <address type='pci' bus='20'/> + <address type='pci' bus='18'/> </interface> <interface type='user'> <mac address='52:54:00:df:22:b2'/> <model type='e1000'/> - <address type='pci' bus='21'/> + <address type='pci' bus='19'/> </interface> <interface type='user'> <mac address='52:54:00:d2:9a:47'/> <model type='e1000'/> - <address type='pci' bus='22'/> + <address type='pci' bus='20'/> </interface> <interface type='user'> <mac address='52:54:00:86:05:e2'/> <model type='e1000'/> - <address type='pci' bus='23'/> + <address type='pci' bus='21'/> </interface> <interface type='user'> <mac address='52:54:00:8c:1c:c2'/> <model type='e1000'/> - <address type='pci' bus='24'/> + <address type='pci' bus='22'/> </interface> <interface type='user'> <mac address='52:54:00:48:58:92'/> <model type='e1000'/> - <address type='pci' bus='25'/> + <address type='pci' bus='23'/> </interface> <interface type='user'> <mac address='52:54:00:99:e5:bf'/> <model type='e1000'/> - <address type='pci' bus='26'/> + <address type='pci' bus='24'/> </interface> <interface type='user'> <mac address='52:54:00:b1:8c:25'/> <model type='e1000'/> - <address type='pci' bus='27'/> + <address type='pci' bus='25'/> </interface> <interface type='user'> <mac address='52:54:00:60:e0:d0'/> <model type='e1000'/> - <address type='pci' bus='28'/> + <address type='pci' bus='26'/> </interface> <interface type='user'> <mac address='52:54:00:37:00:6a'/> <model type='e1000'/> - <address type='pci' bus='29'/> + <address type='pci' bus='27'/> </interface> <interface type='user'> <mac address='52:54:00:c7:c8:ad'/> <model type='e1000'/> - <address type='pci' bus='30'/> + <address type='pci' bus='28'/> </interface> <interface type='user'> <mac address='52:54:00:4e:a7:cf'/> <model type='e1000'/> - <address type='pci' bus='31'/> + <address type='pci' bus='29'/> </interface> <interface type='user'> <mac address='52:54:00:00:79:69'/> <model type='e1000'/> - <address type='pci' bus='32'/> + <address type='pci' bus='30'/> </interface> <interface type='user'> <mac address='52:54:00:47:00:6f'/> <model type='e1000'/> - <address type='pci' bus='33'/> + <address type='pci' bus='31'/> </interface> <interface type='user'> <mac address='52:54:00:2a:8c:8b'/> <model type='e1000'/> - <address type='pci' bus='34'/> + <address type='pci' bus='32'/> </interface> <interface type='user'> <mac address='52:54:00:ec:d5:e3'/> <model type='e1000'/> - <address type='pci' bus='35'/> + <address type='pci' bus='33'/> </interface> <interface type='user'> <mac address='52:54:00:7e:6e:c8'/> <model type='e1000'/> - <address type='pci' bus='36'/> + <address type='pci' bus='34'/> </interface> <interface type='user'> <mac address='52:54:00:7e:6d:c9'/> <model type='e1000'/> - <address type='pci' bus='37'/> + <address type='pci' bus='35'/> </interface> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-too-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-too-many.xml index 98be1cd..5234e3b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-too-many.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-too-many.xml @@ -20,8 +20,8 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'/> - <controller type='pci' index='2' model='pci-bridge'/> + <controller type='pci' index='1' model='pcie-root-port'/> + <controller type='pci' index='2' model='pcie-root-port'/> <controller type='pci' index='3' model='pcie-root-port'/> <controller type='pci' index='4' model='pcie-root-port'/> <controller type='pci' index='5' model='pcie-root-port'/> @@ -49,8 +49,6 @@ <controller type='pci' index='27' model='pcie-root-port'/> <controller type='pci' index='28' model='pcie-root-port'/> <controller type='pci' index='29' model='pcie-root-port'/> - <controller type='pci' index='30' model='pcie-root-port'/> - <controller type='pci' index='31' model='pcie-root-port'/> <controller type='sata' index='0'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.args b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.args index 9a71281..4e852ff 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.args @@ -16,11 +16,9 @@ QEMU_AUDIO_DRV=none \ -monitor unix:/tmp/lib/domain--1-q35-test/monitor.sock,server,nowait \ -no-acpi \ -boot c \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,multifunction=on,\ +-device ioh3420,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ addr=0x2 \ --device ioh3420,port=0x1a,chassis=40,id=pci.4,bus=pcie.0,addr=0x2.0x1 \ +-device ioh3420,port=0x1a,chassis=40,id=pci.2,bus=pcie.0,addr=0x2.0x1 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \ -device ide-drive,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0 \ -device qxl-vga,id=video0,ram_size=67108864,vram_size=33554432,bus=pcie.0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.xml b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.xml index 795f8dd..7ecc4a6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.xml @@ -20,10 +20,8 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'/> - <controller type='pci' index='2' model='pci-bridge'/> - <controller type='pci' index='3' model='pcie-root-port'/> - <controller type='pci' index='4' model='pcie-root-port'> + <controller type='pci' index='1' model='pcie-root-port'/> + <controller type='pci' index='2' model='pcie-root-port'> <model name='ioh3420'/> <target chassis='40' port='0x1a'/> </controller> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-downstream-port.args b/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-downstream-port.args index 3b3e80d..1102b38 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-downstream-port.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-downstream-port.args @@ -16,18 +16,16 @@ QEMU_AUDIO_DRV=none \ -monitor unix:/tmp/lib/domain--1-q35-test/monitor.sock,server,nowait \ -no-acpi \ -boot c \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \ --device x3130-upstream,id=pci.4,bus=pci.3,addr=0x0 \ --device xio3130-downstream,port=0x0,chassis=5,id=pci.5,bus=pci.4,addr=0x0 \ --device xio3130-downstream,port=0x1,chassis=6,id=pci.6,bus=pci.4,addr=0x1 \ --device xio3130-downstream,port=0x2,chassis=7,id=pci.7,bus=pci.4,addr=0x2 \ --device xio3130-downstream,port=0x27,chassis=30,id=pci.8,bus=pci.4,addr=0x3 \ --device x3130-upstream,id=pci.9,bus=pci.5,addr=0x0 \ --device xio3130-downstream,port=0x4,chassis=10,id=pci.10,bus=pci.4,addr=0x4 \ --device xio3130-downstream,port=0x5,chassis=11,id=pci.11,bus=pci.4,addr=0x5 \ --device xio3130-downstream,port=0x6,chassis=12,id=pci.12,bus=pci.4,addr=0x6 \ +-device ioh3420,port=0x10,chassis=1,id=pci.1,bus=pcie.0,addr=0x2 \ +-device x3130-upstream,id=pci.2,bus=pci.1,addr=0x0 \ +-device xio3130-downstream,port=0x0,chassis=3,id=pci.3,bus=pci.2,addr=0x0 \ +-device xio3130-downstream,port=0x1,chassis=4,id=pci.4,bus=pci.2,addr=0x1 \ +-device xio3130-downstream,port=0x2,chassis=5,id=pci.5,bus=pci.2,addr=0x2 \ +-device xio3130-downstream,port=0x27,chassis=30,id=pci.6,bus=pci.2,addr=0x3 \ +-device x3130-upstream,id=pci.7,bus=pci.3,addr=0x0 \ +-device xio3130-downstream,port=0x4,chassis=8,id=pci.8,bus=pci.2,addr=0x4 \ +-device xio3130-downstream,port=0x5,chassis=9,id=pci.9,bus=pci.2,addr=0x5 \ +-device xio3130-downstream,port=0x6,chassis=10,id=pci.10,bus=pci.2,addr=0x6 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \ -device ide-drive,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0 \ -device qxl-vga,id=video0,ram_size=67108864,vram_size=33554432,bus=pcie.0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-downstream-port.xml b/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-downstream-port.xml index b781675..578cc87 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-downstream-port.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-downstream-port.xml @@ -20,21 +20,19 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'/> - <controller type='pci' index='2' model='pci-bridge'/> - <controller type='pci' index='3' model='pcie-root-port'/> - <controller type='pci' index='4' model='pcie-switch-upstream-port'/> + <controller type='pci' index='1' model='pcie-root-port'/> + <controller type='pci' index='2' model='pcie-switch-upstream-port'/> + <controller type='pci' index='3' model='pcie-switch-downstream-port'/> + <controller type='pci' index='4' model='pcie-switch-downstream-port'/> <controller type='pci' index='5' model='pcie-switch-downstream-port'/> - <controller type='pci' index='6' model='pcie-switch-downstream-port'/> - <controller type='pci' index='7' model='pcie-switch-downstream-port'/> - <controller type='pci' index='8' model='pcie-switch-downstream-port'> + <controller type='pci' index='6' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> <target chassis='30' port='0x27'/> </controller> - <controller type='pci' index='9' model='pcie-switch-upstream-port'/> + <controller type='pci' index='7' model='pcie-switch-upstream-port'/> + <controller type='pci' index='8' model='pcie-switch-downstream-port'/> + <controller type='pci' index='9' model='pcie-switch-downstream-port'/> <controller type='pci' index='10' model='pcie-switch-downstream-port'/> - <controller type='pci' index='11' model='pcie-switch-downstream-port'/> - <controller type='pci' index='12' model='pcie-switch-downstream-port'/> <controller type='sata' index='0'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-upstream-port.args b/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-upstream-port.args index 10aedd5..05db65b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-upstream-port.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-upstream-port.args @@ -16,13 +16,11 @@ QEMU_AUDIO_DRV=none \ -monitor unix:/tmp/lib/domain--1-q35-test/monitor.sock,server,nowait \ -no-acpi \ -boot c \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ --device ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,multifunction=on,\ +-device ioh3420,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,\ addr=0x2 \ --device ioh3420,port=0x11,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x1 \ --device x3130-upstream,id=pci.5,bus=pci.3,addr=0x0 \ --device x3130-upstream,id=pci.6,bus=pci.4,addr=0x0 \ +-device ioh3420,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \ +-device x3130-upstream,id=pci.3,bus=pci.1,addr=0x0 \ +-device x3130-upstream,id=pci.4,bus=pci.2,addr=0x0 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \ -device ide-drive,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0 \ -device qxl-vga,id=video0,ram_size=67108864,vram_size=33554432,bus=pcie.0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-upstream-port.xml b/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-upstream-port.xml index 4205f8a..4caf229 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-upstream-port.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-upstream-port.xml @@ -20,12 +20,10 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'/> - <controller type='pci' index='2' model='pci-bridge'/> - <controller type='pci' index='3' model='pcie-root-port'/> - <controller type='pci' index='4' model='pcie-root-port'/> - <controller type='pci' index='5' model='pcie-switch-upstream-port'/> - <controller type='pci' index='6' model='pcie-switch-upstream-port'> + <controller type='pci' index='1' model='pcie-root-port'/> + <controller type='pci' index='2' model='pcie-root-port'/> + <controller type='pci' index='3' model='pcie-switch-upstream-port'/> + <controller type='pci' index='4' model='pcie-switch-upstream-port'> <model name='x3130-upstream'/> </controller> <controller type='sata' index='0'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcihole64-q35.args b/tests/qemuxml2argvdata/qemuxml2argv-pcihole64-q35.args index ee9f699..179a7c5 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcihole64-q35.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcihole64-q35.args @@ -17,8 +17,6 @@ QEMU_AUDIO_DRV=none \ -no-acpi \ -boot c \ -global q35-pcihost.pci-hole64-size=1048576K \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \ -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \ -device ide-drive,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0 \ -device qxl-vga,id=video0,ram_size=67108864,vram_size=33554432,bus=pcie.0,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcihole64-q35.xml b/tests/qemuxml2argvdata/qemuxml2argv-pcihole64-q35.xml index a967bf4..9367384 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcihole64-q35.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcihole64-q35.xml @@ -22,8 +22,6 @@ <controller type='pci' index='0' model='pcie-root'> <pcihole64 unit='KiB'>1048576</pcihole64> </controller> - <controller type='pci' index='1' model='dmi-to-pci-bridge'/> - <controller type='pci' index='2' model='pci-bridge'/> <controller type='sata' index='0'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-dmi-bad-address1.xml b/tests/qemuxml2argvdata/qemuxml2argv-q35-dmi-bad-address1.xml index e23c874..05e23d9 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-q35-dmi-bad-address1.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-dmi-bad-address1.xml @@ -22,9 +22,8 @@ <model name='pci-bridge'/> <target chassisNr='56'/> </controller> - <controller type='pci' index='3' model='pcie-root-port'/> - <controller type='pci' index='4' model='dmi-to-pci-bridge'> - <address type='pci' bus='2' slot='3'/> + <controller type='pci' index='2' model='dmi-to-pci-bridge'> + <address type='pci' bus='2'/> </controller> <memballoon model='none'/> </devices> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-dmi-bad-address2.xml b/tests/qemuxml2argvdata/qemuxml2argv-q35-dmi-bad-address2.xml index c3c1b6a..7796e52 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-q35-dmi-bad-address2.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-dmi-bad-address2.xml @@ -14,26 +14,11 @@ <on_crash>destroy</on_crash> <devices> <emulator>/usr/libexec/qemu-kvm</emulator> - <disk type='block' device='disk'> - <source dev='/dev/HostVG/QEMUGuest1'/> - <target dev='sda' bus='sata'/> - <address type='drive' controller='0' bus='0' target='0' unit='0'/> - </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> + <controller type='pci' index='1' model='pcie-root-port'/> + <controller type='pci' index='2' model='dmi-to-pci-bridge'> + <address type='pci' bus='1'/> </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='56'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'/> - <controller type='pci' index='4' model='dmi-to-pci-bridge'> - <address type='pci' bus='3'/> - </controller> - <video> - <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1'/> - </video> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-wrong-root.xml b/tests/qemuxml2argvdata/qemuxml2argv-q35-wrong-root.xml index 836de52..8d9f27d 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-q35-wrong-root.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-wrong-root.xml @@ -15,13 +15,6 @@ <devices> <emulator>/usr/bin/qemu-kvm</emulator> <controller type='pci' index='0' model='pci-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='56'/> - </controller> <memballoon model='none'/> </devices> </domain> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35.args b/tests/qemuxml2argvdata/qemuxml2argv-q35.args index 733a4dc..e572e8c 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-q35.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35.args @@ -16,8 +16,6 @@ QEMU_AUDIO_DRV=none \ -monitor unix:/tmp/lib/domain--1-q35-test/monitor.sock,server,nowait \ -no-acpi \ -boot c \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x0 \ -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 \ -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,\ addr=0x1d \ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35.xml b/tests/qemuxml2argvdata/qemuxml2argv-q35.xml index 0c3da85..85e72cd 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-q35.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35.xml @@ -20,13 +20,6 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='56'/> - </controller> <video> <model type='qxl' ram='65536' vram='32768' vgamem='8192' heads='1'/> </video> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.args index f45400d..36237d6 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.args @@ -16,6 +16,4 @@ QEMU_AUDIO_DRV=none \ -monitor unix:/tmp/lib/domain--1-q35-test/monitor.sock,server,nowait \ -no-acpi \ -boot c \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x0 \ -device piix3-usb-uhci,id=usb,bus=pcie.0,addr=0x1 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.xml b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.xml index 5f949d6..9c2a234 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-default-q35.xml @@ -15,11 +15,6 @@ <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'/> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='56'/> - </controller> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </controller> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.args b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.args index 92a4ee3..6ea531f 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.args @@ -16,6 +16,4 @@ QEMU_AUDIO_DRV=none \ -monitor unix:/tmp/lib/domain--1-q35-test/monitor.sock,server,nowait \ -no-acpi \ -boot c \ --device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \ --device pci-bridge,chassis_nr=56,id=pci.2,bus=pci.1,addr=0x0 \ -device nec-usb-xhci,id=usb,bus=pcie.0,addr=0x1 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.xml b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.xml index f6d95b4..c0827f2 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-controller-explicit-q35.xml @@ -15,11 +15,6 @@ <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'/> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='56'/> - </controller> <controller type='usb' index='0' model='nec-xhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </controller> diff --git a/tests/qemuxml2argvdata/qemuxml2argv-vcpu-placement-static.xml b/tests/qemuxml2argvdata/qemuxml2argv-vcpu-placement-static.xml index 9cd00c0..a777f50 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-vcpu-placement-static.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-vcpu-placement-static.xml @@ -26,12 +26,6 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> - </controller> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <memballoon model='none'/> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu.xml index b5b2b51..de921f6 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu.xml @@ -15,23 +15,12 @@ <devices> <emulator>/usr/bin/qemu</emulator> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> - <memballoon model='virtio'> - <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> - </memballoon> + <memballoon model='none'/> <iommu model='intel'/> </devices> </domain> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-expander-bus.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-expander-bus.xml index 7a37870..377ced2 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-expander-bus.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-expander-bus.xml @@ -27,192 +27,183 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='56'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> - <controller type='pci' index='3' model='pcie-expander-bus'> + <controller type='pci' index='1' model='pcie-expander-bus'> <model name='pxb-pcie'/> <target busNr='254'> <node>0</node> </target> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </controller> - <controller type='pci' index='4' model='pcie-root-port'> + <controller type='pci' index='2' model='pcie-root-port'> <model name='ioh3420'/> - <target chassis='4' port='0x0' busNr='220'> + <target chassis='2' port='0x0' busNr='220'> <node>1</node> </target> - <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </controller> - <controller type='pci' index='5' model='pcie-switch-upstream-port'> + <controller type='pci' index='3' model='pcie-switch-upstream-port'> <model name='x3130-upstream'/> - <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='4' model='pcie-switch-downstream-port'> + <model name='xio3130-downstream'/> + <target chassis='4' port='0x0'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> + </controller> + <controller type='pci' index='5' model='pcie-switch-downstream-port'> + <model name='xio3130-downstream'/> + <target chassis='5' port='0x1'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x01' function='0x0'/> </controller> <controller type='pci' index='6' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='6' port='0x0'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> + <target chassis='6' port='0x2'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x02' function='0x0'/> </controller> <controller type='pci' index='7' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='7' port='0x1'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x01' function='0x0'/> + <target chassis='7' port='0x3'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x03' function='0x0'/> </controller> <controller type='pci' index='8' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='8' port='0x2'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x02' function='0x0'/> + <target chassis='8' port='0x4'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x04' function='0x0'/> </controller> <controller type='pci' index='9' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='9' port='0x3'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x03' function='0x0'/> + <target chassis='9' port='0x5'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x05' function='0x0'/> </controller> <controller type='pci' index='10' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='10' port='0x4'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x04' function='0x0'/> + <target chassis='10' port='0x6'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x06' function='0x0'/> </controller> <controller type='pci' index='11' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='11' port='0x5'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x05' function='0x0'/> + <target chassis='11' port='0x7'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x07' function='0x0'/> </controller> <controller type='pci' index='12' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='12' port='0x6'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x06' function='0x0'/> + <target chassis='12' port='0x8'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x08' function='0x0'/> </controller> <controller type='pci' index='13' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='13' port='0x7'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x07' function='0x0'/> + <target chassis='13' port='0x9'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x09' function='0x0'/> </controller> <controller type='pci' index='14' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='14' port='0x8'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x08' function='0x0'/> + <target chassis='14' port='0xa'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x0a' function='0x0'/> </controller> <controller type='pci' index='15' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='15' port='0x9'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x09' function='0x0'/> + <target chassis='15' port='0xb'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x0b' function='0x0'/> </controller> <controller type='pci' index='16' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='16' port='0xa'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x0a' function='0x0'/> + <target chassis='16' port='0xc'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x0c' function='0x0'/> </controller> <controller type='pci' index='17' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='17' port='0xb'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x0b' function='0x0'/> + <target chassis='17' port='0xd'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x0d' function='0x0'/> </controller> <controller type='pci' index='18' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='18' port='0xc'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x0c' function='0x0'/> + <target chassis='18' port='0xe'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x0e' function='0x0'/> </controller> <controller type='pci' index='19' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='19' port='0xd'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x0d' function='0x0'/> + <target chassis='19' port='0xf'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x0f' function='0x0'/> </controller> <controller type='pci' index='20' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='20' port='0xe'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x0e' function='0x0'/> + <target chassis='20' port='0x10'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x10' function='0x0'/> </controller> <controller type='pci' index='21' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='21' port='0xf'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x0f' function='0x0'/> + <target chassis='21' port='0x11'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x11' function='0x0'/> </controller> <controller type='pci' index='22' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='22' port='0x10'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x10' function='0x0'/> + <target chassis='22' port='0x12'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x12' function='0x0'/> </controller> <controller type='pci' index='23' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='23' port='0x11'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x11' function='0x0'/> + <target chassis='23' port='0x13'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x13' function='0x0'/> </controller> <controller type='pci' index='24' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='24' port='0x12'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x12' function='0x0'/> + <target chassis='24' port='0x14'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x14' function='0x0'/> </controller> <controller type='pci' index='25' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='25' port='0x13'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x13' function='0x0'/> + <target chassis='25' port='0x15'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x15' function='0x0'/> </controller> <controller type='pci' index='26' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='26' port='0x14'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x14' function='0x0'/> + <target chassis='26' port='0x16'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x16' function='0x0'/> </controller> <controller type='pci' index='27' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='27' port='0x15'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x15' function='0x0'/> + <target chassis='27' port='0x17'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x17' function='0x0'/> </controller> <controller type='pci' index='28' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='28' port='0x16'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x16' function='0x0'/> + <target chassis='28' port='0x18'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x18' function='0x0'/> </controller> <controller type='pci' index='29' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='29' port='0x17'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x17' function='0x0'/> + <target chassis='29' port='0x19'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x19' function='0x0'/> </controller> <controller type='pci' index='30' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='30' port='0x18'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x18' function='0x0'/> + <target chassis='30' port='0x1a'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x1a' function='0x0'/> </controller> <controller type='pci' index='31' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='31' port='0x19'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x19' function='0x0'/> + <target chassis='31' port='0x1b'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x1b' function='0x0'/> </controller> <controller type='pci' index='32' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='32' port='0x1a'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x1a' function='0x0'/> + <target chassis='32' port='0x1c'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x1c' function='0x0'/> </controller> <controller type='pci' index='33' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='33' port='0x1b'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x1b' function='0x0'/> + <target chassis='33' port='0x1d'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x1d' function='0x0'/> </controller> <controller type='pci' index='34' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='34' port='0x1c'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x1c' function='0x0'/> + <target chassis='34' port='0x1e'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x1e' function='0x0'/> </controller> <controller type='pci' index='35' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='35' port='0x1d'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x1d' function='0x0'/> - </controller> - <controller type='pci' index='36' model='pcie-switch-downstream-port'> - <model name='xio3130-downstream'/> - <target chassis='36' port='0x1e'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='37' model='pcie-switch-downstream-port'> - <model name='xio3130-downstream'/> - <target chassis='37' port='0x1f'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x1f' function='0x0'/> + <target chassis='35' port='0x1f'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x1f' function='0x0'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> @@ -220,162 +211,162 @@ <interface type='user'> <mac address='52:54:00:f1:95:51'/> <model type='rtl8139'/> - <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:5c:c6:1a'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:39:97:ac'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:ee:b9:a8'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:a9:f7:17'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:df:2b:f3'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:78:94:b4'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:6b:9b:06'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x0d' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:17:df:bc'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x0e' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:3b:d0:51'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x0f' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x0d' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:8d:2d:17'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x10' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x0e' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:a7:66:af'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x11' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x0f' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:54:ab:d7'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x12' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x10' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:1f:99:90'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x13' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x11' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:c8:43:87'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x14' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x12' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:df:22:b2'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x15' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x13' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:d2:9a:47'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x16' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x14' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:86:05:e2'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x17' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x15' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:8c:1c:c2'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x18' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x16' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:48:58:92'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x19' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x17' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:99:e5:bf'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x1a' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x18' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:b1:8c:25'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x1b' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x19' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:60:e0:d0'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x1c' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x1a' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:37:00:6a'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x1d' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x1b' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:c7:c8:ad'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x1e' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x1c' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:4e:a7:cf'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x1f' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x1d' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:00:79:69'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x20' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x1e' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:47:00:6f'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x21' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x1f' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:2a:8c:8b'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x22' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x20' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:ec:d5:e3'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x23' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x21' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:7e:6e:c8'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x24' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x22' slot='0x00' function='0x0'/> </interface> <interface type='user'> <mac address='52:54:00:7e:6d:c9'/> <model type='e1000'/> - <address type='pci' domain='0x0000' bus='0x25' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x23' slot='0x00' function='0x0'/> </interface> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml index 5c1ebef..5775eb9 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml @@ -20,21 +20,12 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'> + <controller type='pci' index='1' model='pcie-root-port'> <model name='ioh3420'/> - <target chassis='3' port='0x10'/> + <target chassis='1' port='0x10'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/> </controller> - <controller type='pci' index='4' model='pcie-root-port'> + <controller type='pci' index='2' model='pcie-root-port'> <model name='ioh3420'/> <target chassis='40' port='0x1a'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-downstream-port.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-downstream-port.xml index beb6ca8..a80316c 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-downstream-port.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-downstream-port.xml @@ -20,62 +20,53 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'> + <controller type='pci' index='1' model='pcie-root-port'> <model name='ioh3420'/> - <target chassis='3' port='0x10'/> + <target chassis='1' port='0x10'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </controller> - <controller type='pci' index='4' model='pcie-switch-upstream-port'> + <controller type='pci' index='2' model='pcie-switch-upstream-port'> <model name='x3130-upstream'/> - <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </controller> - <controller type='pci' index='5' model='pcie-switch-downstream-port'> + <controller type='pci' index='3' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='5' port='0x0'/> - <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> + <target chassis='3' port='0x0'/> + <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </controller> - <controller type='pci' index='6' model='pcie-switch-downstream-port'> + <controller type='pci' index='4' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='6' port='0x1'/> - <address type='pci' domain='0x0000' bus='0x04' slot='0x01' function='0x0'/> + <target chassis='4' port='0x1'/> + <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/> </controller> - <controller type='pci' index='7' model='pcie-switch-downstream-port'> + <controller type='pci' index='5' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='7' port='0x2'/> - <address type='pci' domain='0x0000' bus='0x04' slot='0x02' function='0x0'/> + <target chassis='5' port='0x2'/> + <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/> </controller> - <controller type='pci' index='8' model='pcie-switch-downstream-port'> + <controller type='pci' index='6' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> <target chassis='30' port='0x27'/> - <address type='pci' domain='0x0000' bus='0x04' slot='0x03' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/> </controller> - <controller type='pci' index='9' model='pcie-switch-upstream-port'> + <controller type='pci' index='7' model='pcie-switch-upstream-port'> <model name='x3130-upstream'/> - <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> </controller> - <controller type='pci' index='10' model='pcie-switch-downstream-port'> + <controller type='pci' index='8' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='10' port='0x4'/> - <address type='pci' domain='0x0000' bus='0x04' slot='0x04' function='0x0'/> + <target chassis='8' port='0x4'/> + <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/> </controller> - <controller type='pci' index='11' model='pcie-switch-downstream-port'> + <controller type='pci' index='9' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='11' port='0x5'/> - <address type='pci' domain='0x0000' bus='0x04' slot='0x05' function='0x0'/> + <target chassis='9' port='0x5'/> + <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/> </controller> - <controller type='pci' index='12' model='pcie-switch-downstream-port'> + <controller type='pci' index='10' model='pcie-switch-downstream-port'> <model name='xio3130-downstream'/> - <target chassis='12' port='0x6'/> - <address type='pci' domain='0x0000' bus='0x04' slot='0x06' function='0x0'/> + <target chassis='10' port='0x6'/> + <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml index f35ebf7..b35be3c 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml @@ -20,32 +20,23 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> - <controller type='pci' index='3' model='pcie-root-port'> + <controller type='pci' index='1' model='pcie-root-port'> <model name='ioh3420'/> - <target chassis='3' port='0x10'/> + <target chassis='1' port='0x10'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/> </controller> - <controller type='pci' index='4' model='pcie-root-port'> + <controller type='pci' index='2' model='pcie-root-port'> <model name='ioh3420'/> - <target chassis='4' port='0x11'/> + <target chassis='2' port='0x11'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/> </controller> - <controller type='pci' index='5' model='pcie-switch-upstream-port'> + <controller type='pci' index='3' model='pcie-switch-upstream-port'> <model name='x3130-upstream'/> - <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> </controller> - <controller type='pci' index='6' model='pcie-switch-upstream-port'> + <controller type='pci' index='4' model='pcie-switch-upstream-port'> <model name='x3130-upstream'/> - <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/> + <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/> </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcihole64-q35.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcihole64-q35.xml index dad7d1a..03a4e8e 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcihole64-q35.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcihole64-q35.xml @@ -22,15 +22,6 @@ <controller type='pci' index='0' model='pcie-root'> <pcihole64 unit='KiB'>1048576</pcihole64> </controller> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> <controller type='sata' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml index 58c7fab..e3d4fa0 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35.xml @@ -20,15 +20,6 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='56'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x00' slot='0x1d' function='0x7'/> </controller> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml index 456fd54..b4f94b6 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-default-q35.xml @@ -15,15 +15,6 @@ <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='56'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> <controller type='usb' index='0' model='piix3-uhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </controller> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml index db92c22..8baaee4 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-controller-explicit-q35.xml @@ -15,15 +15,6 @@ <devices> <emulator>/usr/libexec/qemu-kvm</emulator> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='56'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/> - </controller> <controller type='usb' index='0' model='nec-xhci'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/> </controller> diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-vcpu-placement-static.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-vcpu-placement-static.xml index c6471e3..a777f50 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-vcpu-placement-static.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-vcpu-placement-static.xml @@ -26,15 +26,6 @@ <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/> </controller> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'> - <model name='i82801b11-bridge'/> - <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/> - </controller> - <controller type='pci' index='2' model='pci-bridge'> - <model name='pci-bridge'/> - <target chassisNr='2'/> - <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/> - </controller> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/> <memballoon model='none'/> -- 2.7.4

On 02/21/2017 02:57 PM, Andrea Bolognani wrote:
Up until a while ago, libvirt would automatically add a legacy PCI controllers combo (dmi-to-pci-bridge + pci-bridge) to any PCIe machine type (x86_64/q35 and aarch64/virt).
As a result, a number of input and output files in the test suite ended up containing the legacy PCI controllers, even though they are not needed or in any way relevant to the feature being tested.
Get rid of most of the occurrences. Most of the time, this just means removing the controllers from the input file and regenerating the output files; in a few instances, some minor tweaking is performed on the input file, most notably removing the memory balloon: as memory balloon support was not the scope of the test being changed, there is no loss of test coverage from doing so.
There's a lot of this going on for many many devices/options. Won't anybody think of the poor overtired electrons!?!?!? Much ACK. Very same output. (for the uninformed, we had a conversation on IRC about the pcie-root-port-too-many test, and how I thought it should now succeed due to this patch's removal of 2 PCI controllers. It turns out that it has been failing with a *different* error ever since I added "slot aggregation" (which places 8 pcie-root-ports on each slot, and thus should be causing pcie-root-port-too-many to *succeed*) I'm now writing a patch to fix the test). This one:
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-too-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-too-many.xml index 98be1cd..5234e3b 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-too-many.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-too-many.xml @@ -20,8 +20,8 @@ <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <controller type='pci' index='0' model='pcie-root'/> - <controller type='pci' index='1' model='dmi-to-pci-bridge'/> - <controller type='pci' index='2' model='pci-bridge'/> + <controller type='pci' index='1' model='pcie-root-port'/> + <controller type='pci' index='2' model='pcie-root-port'/> <controller type='pci' index='3' model='pcie-root-port'/> <controller type='pci' index='4' model='pcie-root-port'/> <controller type='pci' index='5' model='pcie-root-port'/> @@ -49,8 +49,6 @@ <controller type='pci' index='27' model='pcie-root-port'/> <controller type='pci' index='28' model='pcie-root-port'/> <controller type='pci' index='29' model='pcie-root-port'/> - <controller type='pci' index='30' model='pcie-root-port'/> - <controller type='pci' index='31' model='pcie-root-port'/> <controller type='sata' index='0'/> <input type='mouse' bus='ps2'/> <input type='keyboard' bus='ps2'/>

qemuDomainAssignPCIAddresses() hardcoded the assumption that the only way to support devices on a non-zero bus is to add one or more pci-bridges; however, since we now support a large selection of PCI controllers that can be used instead, the assumption is no longer true. Moreover, this check was always redundant, because the only sensible time to check for the availability of pci-bridge is when building the QEMU command line, and such a check is of course already in place. In fact, there were *two* such checks, but since one of the two was relying on the incorrect assumption explained above, and it was redundant anyway, it has been dropped. --- src/qemu/qemu_command.c | 7 ------- src/qemu/qemu_domain_address.c | 10 +--------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f0b938f..0ff1e7d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -342,13 +342,6 @@ qemuBuildDeviceAddressStr(virBufferPtr buf, } } - if (info->addr.pci.bus != 0 && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCI_BRIDGE)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Multiple PCI buses are not supported " - "with this QEMU binary")); - goto cleanup; - } virBufferAsprintf(buf, ",bus=%s", contAlias); if (info->addr.pci.multi == VIR_TRISTATE_SWITCH_ON) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 5b75044..f8995c9 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1983,9 +1983,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, if (qemuDomainFillAllPCIConnectFlags(def, qemuCaps, driver) < 0) goto cleanup; - if (nbuses > 0 && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCI_BRIDGE)) { - + if (nbuses > 0) { /* 1st pass to figure out how many PCI bridges we need */ if (!(addrs = qemuDomainPCIAddressSetCreate(def, nbuses, true))) goto cleanup; @@ -2109,12 +2107,6 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, nbuses = addrs->nbuses; virDomainPCIAddressSetFree(addrs); addrs = NULL; - - } else if (max_idx > 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("PCI bridges are not supported " - "by this QEMU binary")); - goto cleanup; } if (!(addrs = qemuDomainPCIAddressSetCreate(def, nbuses, false))) -- 2.7.4

On 02/21/2017 02:57 PM, Andrea Bolognani wrote:
qemuDomainAssignPCIAddresses() hardcoded the assumption that the only way to support devices on a non-zero bus is to add one or more pci-bridges; however, since we now support a large selection of PCI controllers that can be used instead, the assumption is no longer true.
Moreover, this check was always redundant, because the only sensible time to check for the availability of pci-bridge is when building the QEMU command line, and such a check is of course already in place.
In fact, there were *two* such checks, but since one of the two was relying on the incorrect assumption explained above, and it was redundant anyway, it has been dropped. --- src/qemu/qemu_command.c | 7 ------- src/qemu/qemu_domain_address.c | 10 +--------- 2 files changed, 1 insertion(+), 16 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f0b938f..0ff1e7d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -342,13 +342,6 @@ qemuBuildDeviceAddressStr(virBufferPtr buf, } }
- if (info->addr.pci.bus != 0 && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCI_BRIDGE)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("Multiple PCI buses are not supported " - "with this QEMU binary")); - goto cleanup; - } virBufferAsprintf(buf, ",bus=%s", contAlias);
if (info->addr.pci.multi == VIR_TRISTATE_SWITCH_ON) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 5b75044..f8995c9 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1983,9 +1983,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, if (qemuDomainFillAllPCIConnectFlags(def, qemuCaps, driver) < 0) goto cleanup;
- if (nbuses > 0 && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCI_BRIDGE)) { - + if (nbuses > 0) {
I go past this check every couple months and each time I think "that is wrong. I should fix it.", but then forget by the time I'm done with whatever else I was doing. But beyond that, it seems like we should be able to remove the "if (nbuses > 0)" too - if nbuses is 0, that means there is no root bus to put any additional buses on, and *that* means that if there is any device requiring a PCI address, it's going to cause a failure while trying to assign addresses whether it's the "trial pass" (checking if we need to add more controllers) or the "real pass" (that actually assigns the addresses that will be used) - we could just as easily fail during the trial pass. That's immaterial to your change though. ACK on what you've got here (and if you want to see what happens when you remove the rest of the conditional, that would be good too).
/* 1st pass to figure out how many PCI bridges we need */ if (!(addrs = qemuDomainPCIAddressSetCreate(def, nbuses, true))) goto cleanup; @@ -2109,12 +2107,6 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, nbuses = addrs->nbuses; virDomainPCIAddressSetFree(addrs); addrs = NULL; - - } else if (max_idx > 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("PCI bridges are not supported " - "by this QEMU binary")); - goto cleanup; }
if (!(addrs = qemuDomainPCIAddressSetCreate(def, nbuses, false)))

Now that QEMU_CAPS_DEVICE_PCI_BRIDGE is no longer checked unless a pci-bridge is really part of the configuration, and most uses of the legacy PCI controller combo have been dropped from tests that use PCIe machine types, we can drop the corresponding capabilities from a lot of test cases. --- tests/qemuxml2argvtest.c | 83 +++++++++--------------------------------------- tests/qemuxml2xmltest.c | 56 +++++++++----------------------- 2 files changed, 30 insertions(+), 109 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f55b04b..b5b7555 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -702,13 +702,9 @@ mymain(void) DO_TEST("boot-network", NONE); DO_TEST("boot-floppy", NONE); DO_TEST("boot-floppy-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI); DO_TEST("bootindex-floppy-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_BOOT_MENU, QEMU_CAPS_BOOTINDEX); @@ -1392,24 +1388,20 @@ mymain(void) DO_TEST_PARSE_ERROR("usb-none-usbtablet", QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG); DO_TEST("usb-controller-default-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PCI_OHCI, + QEMU_CAPS_PCI_OHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_NEC_USB_XHCI); DO_TEST_FAILURE("usb-controller-default-unavailable-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PCI_OHCI, + QEMU_CAPS_PCI_OHCI, QEMU_CAPS_NEC_USB_XHCI); DO_TEST("usb-controller-explicit-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PCI_OHCI, + QEMU_CAPS_PCI_OHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_NEC_USB_XHCI); DO_TEST_FAILURE("usb-controller-explicit-unavailable-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PCI_OHCI, + QEMU_CAPS_PCI_OHCI, QEMU_CAPS_PIIX3_USB_UHCI); DO_TEST("usb-controller-xhci", QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_PIIX3_USB_UHCI, @@ -1684,8 +1676,7 @@ mymain(void) DO_TEST("video-device-pciaddr-default", QEMU_CAPS_KVM, QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, - QEMU_CAPS_DEVICE_QXL, - QEMU_CAPS_DEVICE_PCI_BRIDGE); + QEMU_CAPS_DEVICE_QXL); DO_TEST("video-vga-nodevice", QEMU_CAPS_DEVICE_VGA); DO_TEST("video-vga-device", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_DEVICE_VIDEO_PRIMARY); @@ -1791,30 +1782,21 @@ mymain(void) QEMU_CAPS_DEVICE_CIRRUS_VGA); DO_TEST("pci-autofill-addr", QEMU_CAPS_DEVICE_CIRRUS_VGA); DO_TEST("pci-many", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_CIRRUS_VGA); DO_TEST("pci-bridge-many-disks", QEMU_CAPS_DEVICE_PCI_BRIDGE); DO_TEST("pcie-root", QEMU_CAPS_ICH9_AHCI, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420); DO_TEST("q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST_PARSE_ERROR("q35-dmi-bad-address1", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420); DO_TEST_PARSE_ERROR("q35-dmi-bad-address2", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420); DO_TEST("q35-pm-disable", QEMU_CAPS_DEVICE_PCI_BRIDGE, @@ -1917,8 +1899,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -1940,8 +1920,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -1963,8 +1941,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -1991,8 +1967,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -2006,8 +1980,6 @@ mymain(void) QEMU_CAPS_HDA_DUPLEX, QEMU_CAPS_USB_REDIR); DO_TEST("pcie-root-port", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -2031,8 +2003,6 @@ mymain(void) QEMU_CAPS_HDA_DUPLEX); DO_TEST_PARSE_ERROR("q35-wrong-root", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1, @@ -2041,16 +2011,12 @@ mymain(void) DO_TEST_PARSE_ERROR("440fx-wrong-root", NONE); DO_TEST_PARSE_ERROR("pcie-root-port-too-many", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("pcie-switch-upstream-port", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, QEMU_CAPS_ICH9_AHCI, @@ -2058,8 +2024,6 @@ mymain(void) QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("pcie-switch-downstream-port", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM, @@ -2068,35 +2032,25 @@ mymain(void) QEMU_CAPS_DEVICE_QXL); DO_TEST("pci-expander-bus", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PXB); DO_TEST_PARSE_ERROR("pci-expander-bus-bad-node", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PXB); DO_TEST_PARSE_ERROR("pci-expander-bus-bad-machine", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PXB); DO_TEST_PARSE_ERROR("pci-expander-bus-bad-bus", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PXB); DO_TEST("pcie-expander-bus", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM, QEMU_CAPS_DEVICE_PXB_PCIE); DO_TEST_PARSE_ERROR("pcie-expander-bus-bad-machine", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM, QEMU_CAPS_DEVICE_PXB_PCIE); DO_TEST_PARSE_ERROR("pcie-expander-bus-bad-bus", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_PXB_PCIE); @@ -2137,14 +2091,10 @@ mymain(void) DO_TEST("mlock-off", QEMU_CAPS_REALTIME_MLOCK); DO_TEST("mlock-unsupported", NONE); - DO_TEST_PARSE_ERROR("pci-bridge-negative-index-invalid", - QEMU_CAPS_DEVICE_PCI_BRIDGE); - DO_TEST_PARSE_ERROR("pci-bridge-duplicate-index", - QEMU_CAPS_DEVICE_PCI_BRIDGE); - DO_TEST_PARSE_ERROR("pci-root-nonzero-index", - QEMU_CAPS_DEVICE_PCI_BRIDGE); - DO_TEST_PARSE_ERROR("pci-root-address", - QEMU_CAPS_DEVICE_PCI_BRIDGE); + DO_TEST_PARSE_ERROR("pci-bridge-negative-index-invalid", NONE); + DO_TEST_PARSE_ERROR("pci-bridge-duplicate-index", NONE); + DO_TEST_PARSE_ERROR("pci-root-nonzero-index", NONE); + DO_TEST_PARSE_ERROR("pci-root-address", NONE); DO_TEST("hotplug-base", QEMU_CAPS_KVM, QEMU_CAPS_VIRTIO_SCSI); @@ -2152,8 +2102,6 @@ mymain(void) DO_TEST("pcihole64", QEMU_CAPS_I440FX_PCI_HOLE64_SIZE); DO_TEST_FAILURE("pcihole64-none", NONE); DO_TEST("pcihole64-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, @@ -2187,9 +2135,8 @@ mymain(void) QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, - QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_PCI_MULTIFUNCTION, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420); DO_TEST("aarch64-virt-2.6-virtio-pci-default", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, @@ -2212,7 +2159,7 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI); DO_TEST("aarch64-video-virtio-gpu-pci", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_VIRTIO_GPU, QEMU_CAPS_BOOTINDEX); DO_TEST("aarch64-aavmf-virtio-mmio", @@ -2466,12 +2413,12 @@ mymain(void) QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_USB_HUB); DO_TEST("acpi-table", NONE); - DO_TEST("intel-iommu", QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + DO_TEST("intel-iommu", QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_INTEL_IOMMU); - DO_TEST("intel-iommu-machine", QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_MACHINE_OPT, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_MACHINE_IOMMU); + DO_TEST("intel-iommu-machine", + QEMU_CAPS_MACHINE_OPT, + QEMU_CAPS_MACHINE_IOMMU); DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS); diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 0702f58..d3d37a6 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -565,8 +565,7 @@ mymain(void) DO_TEST("cputune-iothreadsched", NONE); DO_TEST("cputune-iothreadsched-zeropriority", NONE); DO_TEST("cputune-numatune", NONE); - DO_TEST("vcpu-placement-static", - QEMU_CAPS_DEVICE_PCI_BRIDGE); + DO_TEST("vcpu-placement-static", NONE); DO_TEST("smp", NONE); DO_TEST("iothreads", NONE); @@ -593,12 +592,12 @@ mymain(void) DO_TEST("usb-piix3-controller", QEMU_CAPS_PIIX3_USB_UHCI); DO_TEST("usb-controller-default-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_NEC_USB_XHCI); DO_TEST("usb-controller-explicit-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_NEC_USB_XHCI); @@ -668,24 +667,19 @@ mymain(void) DO_TEST("metadata", NONE); DO_TEST("metadata-duplicate", NONE); - DO_TEST("pci-bridge", - QEMU_CAPS_DEVICE_PCI_BRIDGE); - DO_TEST("pci-bridge-many-disks", - QEMU_CAPS_DEVICE_PCI_BRIDGE); - DO_TEST("pci-autoadd-addr", - QEMU_CAPS_DEVICE_PCI_BRIDGE); - DO_TEST("pci-autoadd-idx", - QEMU_CAPS_DEVICE_PCI_BRIDGE); + DO_TEST("pci-bridge", NONE); + DO_TEST("pci-bridge-many-disks", NONE); + DO_TEST("pci-autoadd-addr", NONE); + DO_TEST("pci-autoadd-idx", NONE); DO_TEST("pci-autofill-addr", NONE); DO_TEST("q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("q35-usb2", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, @@ -693,13 +687,13 @@ mymain(void) QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("q35-usb2-multi", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("q35-usb2-reorder", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, @@ -718,7 +712,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, @@ -741,7 +734,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, @@ -765,8 +757,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -788,8 +778,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -811,8 +799,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -834,8 +820,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -844,35 +828,30 @@ mymain(void) QEMU_CAPS_DEVICE_ICH9_INTEL_HDA, QEMU_CAPS_DEVICE_VIDEO_PRIMARY); DO_TEST("pcie-root", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("pcie-root-port", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("pcie-switch-upstream-port", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("pcie-switch-downstream-port", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("pci-expander-bus", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PXB); + QEMU_CAPS_DEVICE_PXB); DO_TEST("pcie-expander-bus", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM, QEMU_CAPS_DEVICE_PXB_PCIE); DO_TEST("autoindex", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1, @@ -880,7 +859,6 @@ mymain(void) /* Make sure the user can always override libvirt's default device * placement policy by providing an explicit PCI address */ DO_TEST("q35-pci-force-address", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_HDA_DUPLEX); @@ -944,7 +922,6 @@ mymain(void) DO_TEST("pcihole64-gib", NONE); DO_TEST("pcihole64-none", NONE); DO_TEST("pcihole64-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL, @@ -990,23 +967,22 @@ mymain(void) QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, - QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_PCI_MULTIFUNCTION, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("aarch64-virtio-pci-manual-addresses", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, - QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("aarch64-video-virtio-gpu-pci", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_VIRTIO_GPU, QEMU_CAPS_BOOTINDEX); @@ -1054,8 +1030,6 @@ mymain(void) DO_TEST("video-virtio-gpu-secondary", NONE); DO_TEST("intel-iommu", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420); qemuTestDriverFree(&driver); -- 2.7.4

On 02/21/2017 02:57 PM, Andrea Bolognani wrote:
Now that QEMU_CAPS_DEVICE_PCI_BRIDGE is no longer checked unless a pci-bridge is really part of the configuration, and most uses of the legacy PCI controller combo have been dropped from tests that use PCIe machine types, we can drop the corresponding capabilities from a lot of test cases.
ACK? But what about a hypothetical test that could alert us to a regression if e.g. a dmi-to-pci-bridge was added when a pcie-root-port should have been, but it doesn't trigger a failure because the capability for dmi-to-pci-bridge wasn't set for the test case. (I guess I don't have a problem with extra caps being set in test cases, especially since they make the test cases more similar to real usage.)
--- tests/qemuxml2argvtest.c | 83 +++++++++--------------------------------------- tests/qemuxml2xmltest.c | 56 +++++++++----------------------- 2 files changed, 30 insertions(+), 109 deletions(-)
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f55b04b..b5b7555 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -702,13 +702,9 @@ mymain(void) DO_TEST("boot-network", NONE); DO_TEST("boot-floppy", NONE); DO_TEST("boot-floppy-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI); DO_TEST("bootindex-floppy-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_BOOT_MENU, QEMU_CAPS_BOOTINDEX); @@ -1392,24 +1388,20 @@ mymain(void) DO_TEST_PARSE_ERROR("usb-none-usbtablet", QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG); DO_TEST("usb-controller-default-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PCI_OHCI, + QEMU_CAPS_PCI_OHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_NEC_USB_XHCI); DO_TEST_FAILURE("usb-controller-default-unavailable-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PCI_OHCI, + QEMU_CAPS_PCI_OHCI, QEMU_CAPS_NEC_USB_XHCI); DO_TEST("usb-controller-explicit-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PCI_OHCI, + QEMU_CAPS_PCI_OHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_NEC_USB_XHCI); DO_TEST_FAILURE("usb-controller-explicit-unavailable-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_PCI_OHCI, + QEMU_CAPS_PCI_OHCI, QEMU_CAPS_PIIX3_USB_UHCI); DO_TEST("usb-controller-xhci", QEMU_CAPS_CHARDEV, QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_PIIX3_USB_UHCI, @@ -1684,8 +1676,7 @@ mymain(void) DO_TEST("video-device-pciaddr-default", QEMU_CAPS_KVM, QEMU_CAPS_VNC, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, - QEMU_CAPS_DEVICE_QXL, - QEMU_CAPS_DEVICE_PCI_BRIDGE); + QEMU_CAPS_DEVICE_QXL); DO_TEST("video-vga-nodevice", QEMU_CAPS_DEVICE_VGA); DO_TEST("video-vga-device", QEMU_CAPS_DEVICE_VGA, QEMU_CAPS_DEVICE_VIDEO_PRIMARY); @@ -1791,30 +1782,21 @@ mymain(void) QEMU_CAPS_DEVICE_CIRRUS_VGA); DO_TEST("pci-autofill-addr", QEMU_CAPS_DEVICE_CIRRUS_VGA); DO_TEST("pci-many", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_CIRRUS_VGA); DO_TEST("pci-bridge-many-disks", QEMU_CAPS_DEVICE_PCI_BRIDGE); DO_TEST("pcie-root", QEMU_CAPS_ICH9_AHCI, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420); DO_TEST("q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST_PARSE_ERROR("q35-dmi-bad-address1", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420); DO_TEST_PARSE_ERROR("q35-dmi-bad-address2", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420); DO_TEST("q35-pm-disable", QEMU_CAPS_DEVICE_PCI_BRIDGE, @@ -1917,8 +1899,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -1940,8 +1920,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -1963,8 +1941,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -1991,8 +1967,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -2006,8 +1980,6 @@ mymain(void) QEMU_CAPS_HDA_DUPLEX, QEMU_CAPS_USB_REDIR); DO_TEST("pcie-root-port", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -2031,8 +2003,6 @@ mymain(void) QEMU_CAPS_HDA_DUPLEX);
DO_TEST_PARSE_ERROR("q35-wrong-root", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1, @@ -2041,16 +2011,12 @@ mymain(void) DO_TEST_PARSE_ERROR("440fx-wrong-root", NONE);
DO_TEST_PARSE_ERROR("pcie-root-port-too-many", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL);
DO_TEST("pcie-switch-upstream-port", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, QEMU_CAPS_ICH9_AHCI, @@ -2058,8 +2024,6 @@ mymain(void) QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("pcie-switch-downstream-port", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM, @@ -2068,35 +2032,25 @@ mymain(void) QEMU_CAPS_DEVICE_QXL);
DO_TEST("pci-expander-bus", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PXB); DO_TEST_PARSE_ERROR("pci-expander-bus-bad-node", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PXB); DO_TEST_PARSE_ERROR("pci-expander-bus-bad-machine", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PXB); DO_TEST_PARSE_ERROR("pci-expander-bus-bad-bus", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PXB);
DO_TEST("pcie-expander-bus", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM, QEMU_CAPS_DEVICE_PXB_PCIE); DO_TEST_PARSE_ERROR("pcie-expander-bus-bad-machine", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM, QEMU_CAPS_DEVICE_PXB_PCIE); DO_TEST_PARSE_ERROR("pcie-expander-bus-bad-bus", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_PXB_PCIE);
@@ -2137,14 +2091,10 @@ mymain(void) DO_TEST("mlock-off", QEMU_CAPS_REALTIME_MLOCK); DO_TEST("mlock-unsupported", NONE);
- DO_TEST_PARSE_ERROR("pci-bridge-negative-index-invalid", - QEMU_CAPS_DEVICE_PCI_BRIDGE); - DO_TEST_PARSE_ERROR("pci-bridge-duplicate-index", - QEMU_CAPS_DEVICE_PCI_BRIDGE); - DO_TEST_PARSE_ERROR("pci-root-nonzero-index", - QEMU_CAPS_DEVICE_PCI_BRIDGE); - DO_TEST_PARSE_ERROR("pci-root-address", - QEMU_CAPS_DEVICE_PCI_BRIDGE); + DO_TEST_PARSE_ERROR("pci-bridge-negative-index-invalid", NONE); + DO_TEST_PARSE_ERROR("pci-bridge-duplicate-index", NONE); + DO_TEST_PARSE_ERROR("pci-root-nonzero-index", NONE); + DO_TEST_PARSE_ERROR("pci-root-address", NONE);
DO_TEST("hotplug-base", QEMU_CAPS_KVM, QEMU_CAPS_VIRTIO_SCSI); @@ -2152,8 +2102,6 @@ mymain(void) DO_TEST("pcihole64", QEMU_CAPS_I440FX_PCI_HOLE64_SIZE); DO_TEST_FAILURE("pcihole64-none", NONE); DO_TEST("pcihole64-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, @@ -2187,9 +2135,8 @@ mymain(void) QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, - QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_PCI_MULTIFUNCTION, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420); DO_TEST("aarch64-virt-2.6-virtio-pci-default", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, @@ -2212,7 +2159,7 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI); DO_TEST("aarch64-video-virtio-gpu-pci", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_VIRTIO_GPU, QEMU_CAPS_BOOTINDEX); DO_TEST("aarch64-aavmf-virtio-mmio", @@ -2466,12 +2413,12 @@ mymain(void) QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_USB_HUB);
DO_TEST("acpi-table", NONE); - DO_TEST("intel-iommu", QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + DO_TEST("intel-iommu", QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_INTEL_IOMMU); - DO_TEST("intel-iommu-machine", QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_MACHINE_OPT, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_MACHINE_IOMMU); + DO_TEST("intel-iommu-machine", + QEMU_CAPS_MACHINE_OPT, + QEMU_CAPS_MACHINE_IOMMU);
DO_TEST("cpu-hotplug-startup", QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS);
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 0702f58..d3d37a6 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -565,8 +565,7 @@ mymain(void) DO_TEST("cputune-iothreadsched", NONE); DO_TEST("cputune-iothreadsched-zeropriority", NONE); DO_TEST("cputune-numatune", NONE); - DO_TEST("vcpu-placement-static", - QEMU_CAPS_DEVICE_PCI_BRIDGE); + DO_TEST("vcpu-placement-static", NONE);
DO_TEST("smp", NONE); DO_TEST("iothreads", NONE); @@ -593,12 +592,12 @@ mymain(void) DO_TEST("usb-piix3-controller", QEMU_CAPS_PIIX3_USB_UHCI); DO_TEST("usb-controller-default-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_NEC_USB_XHCI); DO_TEST("usb-controller-explicit-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_PCI_OHCI, QEMU_CAPS_PIIX3_USB_UHCI, QEMU_CAPS_NEC_USB_XHCI); @@ -668,24 +667,19 @@ mymain(void) DO_TEST("metadata", NONE); DO_TEST("metadata-duplicate", NONE);
- DO_TEST("pci-bridge", - QEMU_CAPS_DEVICE_PCI_BRIDGE); - DO_TEST("pci-bridge-many-disks", - QEMU_CAPS_DEVICE_PCI_BRIDGE); - DO_TEST("pci-autoadd-addr", - QEMU_CAPS_DEVICE_PCI_BRIDGE); - DO_TEST("pci-autoadd-idx", - QEMU_CAPS_DEVICE_PCI_BRIDGE); + DO_TEST("pci-bridge", NONE); + DO_TEST("pci-bridge-many-disks", NONE); + DO_TEST("pci-autoadd-addr", NONE); + DO_TEST("pci-autoadd-idx", NONE); DO_TEST("pci-autofill-addr", NONE);
DO_TEST("q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("q35-usb2", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, @@ -693,13 +687,13 @@ mymain(void) QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("q35-usb2-multi", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("q35-usb2-reorder", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, @@ -718,7 +712,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, @@ -741,7 +734,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, @@ -765,8 +757,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -788,8 +778,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -811,8 +799,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -834,8 +820,6 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_FSDEV, QEMU_CAPS_FSDEV_WRITEOUT, - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, @@ -844,35 +828,30 @@ mymain(void) QEMU_CAPS_DEVICE_ICH9_INTEL_HDA, QEMU_CAPS_DEVICE_VIDEO_PRIMARY); DO_TEST("pcie-root", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("pcie-root-port", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("pcie-switch-upstream-port", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("pcie-switch-downstream-port", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); DO_TEST("pci-expander-bus", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PXB); + QEMU_CAPS_DEVICE_PXB); DO_TEST("pcie-expander-bus", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM, QEMU_CAPS_DEVICE_PXB_PCIE); DO_TEST("autoindex", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, QEMU_CAPS_DEVICE_XIO3130_DOWNSTREAM, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_ICH9_USB_EHCI1, @@ -880,7 +859,6 @@ mymain(void) /* Make sure the user can always override libvirt's default device * placement policy by providing an explicit PCI address */ DO_TEST("q35-pci-force-address", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_HDA_DUPLEX); @@ -944,7 +922,6 @@ mymain(void) DO_TEST("pcihole64-gib", NONE); DO_TEST("pcihole64-none", NONE); DO_TEST("pcihole64-q35", - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL, @@ -990,23 +967,22 @@ mymain(void) QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, - QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_PCI_MULTIFUNCTION, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("aarch64-virtio-pci-manual-addresses", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DTB, QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, - QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("aarch64-video-virtio-gpu-pci", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_OBJECT_GPEX, - QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_VIRTIO_GPU, QEMU_CAPS_BOOTINDEX);
@@ -1054,8 +1030,6 @@ mymain(void) DO_TEST("video-virtio-gpu-secondary", NONE);
DO_TEST("intel-iommu", - QEMU_CAPS_DEVICE_PCI_BRIDGE, - QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420);
qemuTestDriverFree(&driver);

On Wed, 2017-02-22 at 09:58 -0500, Laine Stump wrote:
On 02/21/2017 02:57 PM, Andrea Bolognani wrote:
Now that QEMU_CAPS_DEVICE_PCI_BRIDGE is no longer checked unless a pci-bridge is really part of the configuration, and most uses of the legacy PCI controller combo have been dropped from tests that use PCIe machine types, we can drop the corresponding capabilities from a lot of test cases. ACK? But what about a hypothetical test that could alert us to a regression if e.g. a dmi-to-pci-bridge was added when a pcie-root-port should have been, but it doesn't trigger a failure because the capability for dmi-to-pci-bridge wasn't set for the test case. (I guess I don't have a problem with extra caps being set in test cases, especially since they make the test cases more similar to real usage.)
How about we leave the {DMI_TO_,}PCI_BRIDGE capability enabled for three/four of the test cases that we know don't need them, eg. q35, q35-pcie, q35-virtio-pci and q35-pcie-autoadd for this purpose, along with a comment explaining why we've done so? That would still catch a regression. By the way, I just noticed I might have missed a few droppable capabilities; moreover, some test cases don't seem to be using the same capabilities in xml2argv and in xml2xml, which is definitely not cool. So if you're okay with the approach suggested above I'll take care of all these issues and prepare a v2. -- Andrea Bolognani / Red Hat / Virtualization

On 02/22/2017 12:53 PM, Andrea Bolognani wrote:
On Wed, 2017-02-22 at 09:58 -0500, Laine Stump wrote:
On 02/21/2017 02:57 PM, Andrea Bolognani wrote:
Now that QEMU_CAPS_DEVICE_PCI_BRIDGE is no longer checked unless a pci-bridge is really part of the configuration, and most uses of the legacy PCI controller combo have been dropped from tests that use PCIe machine types, we can drop the corresponding capabilities from a lot of test cases.
ACK?
But what about a hypothetical test that could alert us to a regression if e.g. a dmi-to-pci-bridge was added when a pcie-root-port should have been, but it doesn't trigger a failure because the capability for dmi-to-pci-bridge wasn't set for the test case.
(I guess I don't have a problem with extra caps being set in test cases, especially since they make the test cases more similar to real usage.) How about we leave the {DMI_TO_,}PCI_BRIDGE capability enabled for three/four of the test cases that we know don't need them, eg. q35, q35-pcie, q35-virtio-pci and q35-pcie-autoadd for this purpose, along with a comment explaining why we've done so? That would still catch a regression.
By the way, I just noticed I might have missed a few droppable capabilities; moreover, some test cases don't seem to be using the same capabilities in xml2argv and in xml2xml, which is definitely not cool.
So if you're okay with the approach suggested above I'll take care of all these issues and prepare a v2.
That all sounds fine to me.
participants (2)
-
Andrea Bolognani
-
Laine Stump