[PATCH] tests: Drop needless .err files from qemuxml2argvdata/
by Michal Privoznik
As some qemxml2argvtest cases were removed, we forgot to remove
their expected output counterparts.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/qemuxml2argvdata/cpu-numa-memshared.err | 1 -
tests/qemuxml2argvdata/numatune-memnode-no-memory.err | 1 -
tests/qemuxml2argvdata/pseries-vio-address-clash.err | 1 -
3 files changed, 3 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/cpu-numa-memshared.err
delete mode 100644 tests/qemuxml2argvdata/numatune-memnode-no-memory.err
delete mode 100644 tests/qemuxml2argvdata/pseries-vio-address-clash.err
diff --git a/tests/qemuxml2argvdata/cpu-numa-memshared.err b/tests/qemuxml2argvdata/cpu-numa-memshared.err
deleted file mode 100644
index e0fdffd42c..0000000000
--- a/tests/qemuxml2argvdata/cpu-numa-memshared.err
+++ /dev/null
@@ -1 +0,0 @@
-unsupported configuration: this qemu doesn't support the memory-backend-file object
diff --git a/tests/qemuxml2argvdata/numatune-memnode-no-memory.err b/tests/qemuxml2argvdata/numatune-memnode-no-memory.err
deleted file mode 100644
index 1d5e57f996..0000000000
--- a/tests/qemuxml2argvdata/numatune-memnode-no-memory.err
+++ /dev/null
@@ -1 +0,0 @@
-unsupported configuration: Per-node memory binding is not supported with this QEMU
diff --git a/tests/qemuxml2argvdata/pseries-vio-address-clash.err b/tests/qemuxml2argvdata/pseries-vio-address-clash.err
deleted file mode 100644
index e4eed76f23..0000000000
--- a/tests/qemuxml2argvdata/pseries-vio-address-clash.err
+++ /dev/null
@@ -1 +0,0 @@
-XML error: spapr-vio address 0x4000 already in use
--
2.37.4
2 years
[libvirt PATCH v4 0/4] tools: provide virt-qemu-sev-validate for SEV(-ES) launch attestation
by Daniel P. Berrangé
The libvirt QEMU driver provides all the functionality required for
launching a guest on AMD SEV(-ES) platforms, with a configuration
that enables attestation of the launch measurement. The documentation
for how to actually perform an attestation is severely lacking and
not suitable for mere mortals to understand. IOW, someone trying to
implement attestation is in for a world of pain and suffering.
This series doesn't fix the documentation problem, but it does
provide a reference implementation of a tool for performing
attestation of SEV(-ES) guests in the context of libvirt / KVM.
There will be other tools and libraries that implement attestation
logic too, but this tool is likely somewhat unique in its usage of
libvirt. Now for a attestation to be trustworthy you don't want to
perform it on the hypervisor host, since the goal is to prove that
the hypervisor has not acted maliciously. None the less it is still
beneficial to have libvirt integration to some extent.
When running this tool on a remote (trusted) host, it can connect
to the libvirt hypervisor and fetch the data provided by the
virDomainLaunchSecurityInfo API, which is safe to trust as the
key pieces are cryptographically measured.
Attestation is a complex problem though and it is very easy to
screw up and feed the wrong information and then waste hours trying
to figure out what piece was wrong, to cause the hash digest to
change. For debugging such problems, you can thus tell the tool
to operate insecurely, by querying libvirt for almost all of the
configuration information required to determine the expected
measurement. By comparing these results,to the results obtained
in offline mode it helps narrow down where the mistake lies.
So I view this tool as being useful in a number of ways:
* Quality assurance engineers needing to test libvirt/QEMU/KVM
get a simple and reliable tool for automating tests with.
* Users running simple libvirt deployments without any large
management stack, get a standalone tool for attestation
they can rely on.
* Developers writing/integrating attestation support into
management stacks above libvirt, get a reference against
which they can debug their own tools.
* Users wanting to demonstrate the core SEV/SEV-ES functionality
get a simple and reliable tool to illustrate the core concepts
involved.
Since I didn't fancy writing such complex logic in C, this tool is
a python3 program. As such, we don't want to include it in the
main libvirt-client RPM, nor any other existing RPM. THus, this
series puts it in a new libvirt-client-qemu RPM which, through no
co-inicidence at all, is the same RPM I invented a few days ago to
hold the virt-qemu-qmp-proxy command.
Note, people will have already seen an earlier version of this
tool I hacked up some months ago. This code is very significantly
changed since that earlier version, to make it more maintainable,
and simpler to use (especially for SEV-ES) but the general theme
is still the same.
Changed in v4:
- Fixed loading of initrd/cmdline from XML
- s/loader/firmware/ in some error messages
Changed in v3:
- Remove LUKS specific --disk-password and have generic
--inject-secret
- Fix handling of optional initrd/cmdline
- Require --kernel if --initrd or --cmdline are present
- Ensure VM is in paused state
Changed in v2:
- All the suggestions from Cole and Kashyap
Daniel P. Berrangé (4):
build-aux: only forbid gethostname in C files
tools: support validating SEV firmware boot measurements
tools: load guest config from libvirt
tools: support validating SEV direct kernel boot measurements
build-aux/syntax-check.mk | 1 +
docs/manpages/meson.build | 1 +
docs/manpages/virt-qemu-sev-validate.rst | 359 +++++++++++++++
libvirt.spec.in | 2 +
tools/meson.build | 5 +
tools/virt-qemu-sev-validate | 555 +++++++++++++++++++++++
6 files changed, 923 insertions(+)
create mode 100644 docs/manpages/virt-qemu-sev-validate.rst
create mode 100755 tools/virt-qemu-sev-validate
--
2.37.3
2 years
[libvirt PATCH v3 00/12] tools: provide virt-qemu-sev-validate for SEV(-ES) launch attestation
by Daniel P. Berrangé
The libvirt QEMU driver provides all the functionality required for
launching a guest on AMD SEV(-ES) platforms, with a configuration
that enables attestation of the launch measurement. The documentation
for how to actually perform an attestation is severely lacking and
not suitable for mere mortals to understand. IOW, someone trying to
implement attestation is in for a world of pain and suffering.
This series doesn't fix the documentation problem, but it does
provide a reference implementation of a tool for performing
attestation of SEV(-ES) guests in the context of libvirt / KVM.
There will be other tools and libraries that implement attestation
logic too, but this tool is likely somewhat unique in its usage of
libvirt. Now for a attestation to be trustworthy you don't want to
perform it on the hypervisor host, since the goal is to prove that
the hypervisor has not acted maliciously. None the less it is still
beneficial to have libvirt integration to some extent.
When running this tool on a remote (trusted) host, it can connect
to the libvirt hypervisor and fetch the data provided by the
virDomainLaunchSecurityInfo API, which is safe to trust as the
key pieces are cryptographically measured.
Attestation is a complex problem though and it is very easy to
screw up and feed the wrong information and then waste hours trying
to figure out what piece was wrong, to cause the hash digest to
change. For debugging such problems, you can thus tell the tool
to operate insecurely, by querying libvirt for almost all of the
configuration information required to determine the expected
measurement. By comparing these results,to the results obtained
in offline mode it helps narrow down where the mistake lies.
So I view this tool as being useful in a number of ways:
* Quality assurance engineers needing to test libvirt/QEMU/KVM
get a simple and reliable tool for automating tests with.
* Users running simple libvirt deployments without any large
management stack, get a standalone tool for attestation
they can rely on.
* Developers writing/integrating attestation support into
management stacks above libvirt, get a reference against
which they can debug their own tools.
* Users wanting to demonstrate the core SEV/SEV-ES functionality
get a simple and reliable tool to illustrate the core concepts
involved.
Since I didn't fancy writing such complex logic in C, this tool is
a python3 program. As such, we don't want to include it in the
main libvirt-client RPM, nor any other existing RPM. THus, this
series puts it in a new libvirt-client-qemu RPM which, through no
co-inicidence at all, is the same RPM I invented a few days ago to
hold the virt-qemu-qmp-proxy command.
Note, people will have already seen an earlier version of this
tool I hacked up some months ago. This code is very significantly
changed since that earlier version, to make it more maintainable,
and simpler to use (especially for SEV-ES) but the general theme
is still the same.
Changed in v3:
- Remove LUKS specific --disk-password and have generic
--inject-secret
- Fix handling of optional initrd/cmdline
- Require --kernel if --initrd or --cmdline are present
- Ensure VM is in paused state
Changed in v2:
- All the suggestions from Cole and Kashyap
Daniel P. Berrangé (12):
build-aux: only forbid gethostname in C files
tools: support validating SEV firmware boot measurements
tools: load guest config from libvirt
tools: support validating SEV direct kernel boot measurements
tools: load direct kernel config from libvirt
tools: support validating SEV-ES initial vCPU state measurements
tools: support automatically constructing SEV-ES vCPU state
tools: load CPU count and CPU SKU from libvirt
tools: support generating SEV secret injection tables
docs/kbase: describe attestation for SEV guests
scripts: add systemtap script for capturing SEV-ES VMSA
docs/manpages: add checklist of problems for SEV attestation
build-aux/syntax-check.mk | 1 +
docs/kbase/launch_security_sev.rst | 105 ++
docs/manpages/meson.build | 1 +
docs/manpages/virt-qemu-sev-validate.rst | 666 +++++++++++
examples/systemtap/amd-sev-es-vmsa.stp | 48 +
libvirt.spec.in | 2 +
tools/meson.build | 5 +
tools/virt-qemu-sev-validate | 1330 ++++++++++++++++++++++
8 files changed, 2158 insertions(+)
create mode 100644 docs/manpages/virt-qemu-sev-validate.rst
create mode 100644 examples/systemtap/amd-sev-es-vmsa.stp
create mode 100755 tools/virt-qemu-sev-validate
--
2.37.3
2 years
[PATCH] conf: schemas: Include 'privatedata.rng' in installed schema files
by Peter Krempa
The privatedata.rng file was accidentally left uninstalled, but it's
referenced by other schema files effectively breaking validation of XMLs
in new installations.
Change to libvirt.spec is not needed as we include all installed schemas
via a wildcard.
Fixes: d8ceacdc87907a3c8656f7ee815ed32f06fe5c7f
Reported-by: "Daniel P. Berrangé" <berrange(a)redhat.com>
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/schemas/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/schemas/meson.build b/src/conf/schemas/meson.build
index 9ec4c010d6..b293373085 100644
--- a/src/conf/schemas/meson.build
+++ b/src/conf/schemas/meson.build
@@ -19,6 +19,7 @@ schema_files = [
'nwfilterbinding.rng',
'nwfilter_params.rng',
'nwfilter.rng',
+ 'privatedata.rng',
'secret.rng',
'storagecommon.rng',
'storagepoolcaps.rng',
--
2.37.3
2 years
[PATCH 00/12] tests: Schema testing improvements
by Peter Krempa
This series:
- cleans up the XML validator code a bit
- adds testing of nodedevxml2xmlout directory
- cleans up some mistakes in un-tested XML files
- adds internal schema and improves testing of
- cputestdata
- simplifies file selection by using a custom schema
- device schemas (e.g. qemuhotplugtest)
After this series the outstanding list of XML files which are not
validated is:
./examples/xml/test/testnodeinline.xml
./examples/xml/test/testnode.xml
./tests/virsh-auth.xml
All of the above should be tested, but there's no schema for them yet.
./src/cpu_map/*.xml
These are internal input-only data files distributed by libvirt.
Creating a schema for them is possible, but not very justified and
neither simple.
./tests/qemumigparamsdata/*.xml
./tests/qemumigrationcookiexmldata/*.xml
Internal input and output files. Writing a schema could theoretically
make sense as they are used for migration but currently doesn't seem to
be worth it.
./tests/qemucapabilitiesdata/*.xml
Internal input and output, for caching only, thus any incompatibility
allows us to simply drop them. Not worth writing schema.
./tests/qemustatusxml2xmldata/*.xml
Internal status XML, input/output. Writing schema might make sense to
avoid regressions and have a scaffold for future.
./tests/networkxml2xmlupdatein/.xml
Snippets of <network> xml, hard to write custom schema for.
./tests/nodedevmdevctldata/*.xml
./tests/virstorageutildata/*.xml
Non-libvirt test data.
Peter Krempa (12):
virschematest: Test 'nodedevxml2xmlout' directory
qemustatusxml2xml: Remove obsolete 'json' attribute
util: xml: Refactor cleanup path in virXMLValidatorInit
util: xml: Refactor cleanup in virXMLValidateAgainstSchema
virschematest: Construct path to the schema in the SCHEMAS_PATH
virschematest: Improve testing schemas in 'tests/cputestdata'
schema: Introduce scaffolding for schema for <privateData> elements
qemublocktestdata: Fix 'block-raw-reservations' case
tests: qemublocktestdata/imagecreate: Remove bogus 'name="vda"'
attribute from <disk>
qemublocktest: Mark 'network-ssh-qcow2' input XML as invalid
schema: Rename definition of disk 'target' element to 'diskTarget'
virschematest: Add infrastructure for testing single devices
src/conf/schemas/domainbackup.rng | 4 +-
src/conf/schemas/domaincheckpoint.rng | 2 +-
src/conf/schemas/domaincommon.rng | 12 ++-
src/conf/schemas/domainsnapshot.rng | 2 +-
src/conf/schemas/privatedata.rng | 30 +++++++
src/util/virxml.c | 23 ++---
tests/meson.build | 1 +
tests/qemublocktest.c | 2 +-
.../imagecreate/luks-encopts.xml | 2 +-
.../imagecreate/luks-noopts.xml | 2 +-
.../imagecreate/network-gluster-qcow2.xml | 2 +-
.../imagecreate/network-rbd-qcow2.xml | 2 +-
...w2.json => network-ssh-qcow2-invalid.json} | 0
...cow2.xml => network-ssh-qcow2-invalid.xml} | 2 +-
.../imagecreate/qcow2-luks-encopts.xml | 2 +-
.../imagecreate/qcow2-luks-noopts.xml | 2 +-
.../imagecreate/qcow2-slice.xml | 2 +-
tests/qemublocktestdata/imagecreate/qcow2.xml | 2 +-
.../qemublocktestdata/imagecreate/raw-nbd.xml | 2 +-
.../imagecreate/raw-slice.xml | 2 +-
tests/qemublocktestdata/imagecreate/raw.xml | 2 +-
.../xml2json/block-raw-reservations.xml | 2 +-
.../migration-out-nbd-in.xml | 2 +-
.../migration-out-nbd-tls-in.xml | 2 +-
tests/qemustatusxml2xmldata/upgrade-in.xml | 2 +-
tests/schemas/cpu-baseline.rng.in | 84 +++++++++++++++++++
tests/schemas/device.rng.in | 51 +++++++++++
tests/schemas/meson.build | 18 ++++
tests/schemas/privatedata.rng.in | 68 +++++++++++++++
tests/virschematest.c | 28 ++++---
30 files changed, 304 insertions(+), 53 deletions(-)
create mode 100644 src/conf/schemas/privatedata.rng
rename tests/qemublocktestdata/imagecreate/{network-ssh-qcow2.json => network-ssh-qcow2-invalid.json} (100%)
rename tests/qemublocktestdata/imagecreate/{network-ssh-qcow2.xml => network-ssh-qcow2-invalid.xml} (88%)
create mode 100644 tests/schemas/cpu-baseline.rng.in
create mode 100644 tests/schemas/device.rng.in
create mode 100644 tests/schemas/meson.build
create mode 100644 tests/schemas/privatedata.rng.in
--
2.38.1
2 years
[PATCH] qemu: fix vcpu clearing when multiple vcpu hotunplugs timeout
by Shaleen Bathla
Problem:
libvirt has a 5 second timeout (generally) for hotplug/unplug
operations which can time out due to heavy load in guest.
vcpu hotunplug occurs one vcpu at a time.
But, if we perform hotplug-unplug repeatedly, there is a situation
where qemu has multiple timedout vcpu unplug operations pending.
libvirt waits for an async event notification from qemu regarding
successful vcpu delete.
qemu deletes the vcpu-vcpuinfo and sends this notification to libvirt.
libvirt handles vcpu delete notification, and refreshes vcpuinfo
by querying vcpuinfo from qemu in qemuDomainRefreshVcpuInfo().
qemu's vcpuinfo will not contain vcpu that was deleted and sent.
qemu's vcpuinfo will overwrite libvirt's vcpuinfo of the other pending
timedout vcpu(s) which qemu has deleted and notified libvirt.
The overwrite resets other timedout vcpu's alias to NULL and tid to 0.
The error is then seen when validating tid of vcpus.
Example error log:
"internal error: qemu didn't report thread id for vcpu 'XX'"
Solution:
Create a per vcpu hp_timeout_alias which will be set as vcpu alias when a timeout
occurs else it is set as NULL.
This data does not get reset when vcpuinfo refresh occurs.
And we can remove a vcpu if it's alias was NULL by checking this alias.
During vcpu validation, we can skip to nextvcpu if this hotplug-timeout-alias
is set indicating that this vcpu is actually valid.
Co-authored-by: Partha Satapathy <partha.satapathy(a)oracle.com>
Signed-off-by: Shaleen Bathla <shaleen.bathla(a)oracle.com>
---
src/qemu/qemu_domain.c | 6 ++++++
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_hotplug.c | 41 ++++++++++++++++++++++++++++++++++++++++-
3 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index c3afc6c9d3ba..0f6e4dc78b93 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -9568,6 +9568,8 @@ qemuDomainValidateVcpuInfo(virDomainObj *vm)
vcpupriv = QEMU_DOMAIN_VCPU_PRIVATE(vcpu);
if (vcpu->online && vcpupriv->tid == 0) {
+ if (vcpupriv->hp_timeout_alias)
+ continue;
virReportError(VIR_ERR_INTERNAL_ERROR,
_("qemu didn't report thread id for vcpu '%zu'"), i);
return -1;
@@ -9696,6 +9698,10 @@ qemuDomainRefreshVcpuInfo(virDomainObj *vm,
if (validTIDs)
vcpupriv->tid = info[i].tid;
+ if (vcpupriv->hp_timeout_alias && !info[i].alias)
+ VIR_DEBUG("no alias for timed out vcpu%zu domain %s", i,
+ vm->def->name);
+
vcpupriv->socket_id = info[i].socket_id;
vcpupriv->core_id = info[i].core_id;
vcpupriv->thread_id = info[i].thread_id;
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 2bbd492d62da..68f6c645ef79 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -324,6 +324,7 @@ struct _qemuDomainVcpuPrivate {
int thread_id;
int node_id;
int vcpus;
+ char *hp_timeout_alias; /* alias after hotplug timeout */
char *qomPath;
};
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index da92ced2f444..5d54e9c67c3f 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -6138,9 +6138,21 @@ qemuDomainRemoveVcpuAlias(virDomainObj *vm,
if (STREQ_NULLABLE(alias, vcpupriv->alias)) {
qemuDomainRemoveVcpu(vm, i);
+ if (vcpupriv->hp_timeout_alias)
+ g_free(vcpupriv->hp_timeout_alias);
+ return;
+ }
+ if (STREQ_NULLABLE(alias, vcpupriv->hp_timeout_alias)) {
+ qemuDomainRemoveVcpu(vm, i);
+ VIR_DEBUG("%s found in timed out list of domain %s",
+ alias, vm->def->name);
+ g_free(vcpupriv->hp_timeout_alias);
return;
}
}
+
+ VIR_DEBUG("%s not found in vcpulist of domain %s ",
+ alias, vm->def->name);
}
@@ -6172,11 +6184,19 @@ qemuDomainHotplugDelVcpu(virQEMUDriver *driver,
}
if ((rc = qemuDomainWaitForDeviceRemoval(vm)) <= 0) {
- if (rc == 0)
+ if (rc == 0) {
virReportError(VIR_ERR_OPERATION_TIMEOUT, "%s",
_("vcpu unplug request timed out. Unplug result "
"must be manually inspected in the domain"));
+ if (vcpupriv) {
+ VIR_INFO("unplug timeout set for vcpu '%u' of domain %s",
+ vcpu, vm->def->name);
+
+ vcpupriv->hp_timeout_alias = g_strdup(vcpupriv->alias);
+ }
+ }
+
goto cleanup;
}
@@ -6362,6 +6382,8 @@ qemuDomainSetVcpusLive(virQEMUDriver *driver,
{
qemuDomainObjPrivate *priv = vm->privateData;
virCgroupEmulatorAllNodesData *emulatorCgroup = NULL;
+ qemuDomainVcpuPrivate *vcpupriv = NULL;
+ virDomainVcpuDef *vcpuinfo = NULL;
ssize_t nextvcpu = -1;
int ret = -1;
@@ -6370,6 +6392,14 @@ qemuDomainSetVcpusLive(virQEMUDriver *driver,
if (enable) {
while ((nextvcpu = virBitmapNextSetBit(vcpumap, nextvcpu)) != -1) {
+ vcpuinfo = virDomainDefGetVcpu(vm->def, nextvcpu);
+ vcpupriv = QEMU_DOMAIN_VCPU_PRIVATE(vcpuinfo);
+
+ if (vcpupriv && vcpupriv->hp_timeout_alias) {
+ VIR_INFO("reject hotplug of timed out vcpu '%zd' from domain %s",
+ nextvcpu, vm->def->name);
+ goto cleanup;
+ }
if (qemuDomainHotplugAddVcpu(driver, cfg, vm, nextvcpu) < 0)
goto cleanup;
}
@@ -6378,6 +6408,15 @@ qemuDomainSetVcpusLive(virQEMUDriver *driver,
if (!virBitmapIsBitSet(vcpumap, nextvcpu))
continue;
+ vcpuinfo = virDomainDefGetVcpu(vm->def, nextvcpu);
+ vcpupriv = QEMU_DOMAIN_VCPU_PRIVATE(vcpuinfo);
+
+ if (vcpupriv && vcpupriv->hp_timeout_alias) {
+ VIR_INFO("already serving unplug for vcpu '%zd' in domain %s",
+ nextvcpu, vm->def->name);
+ goto cleanup;
+ }
+
if (qemuDomainHotplugDelVcpu(driver, cfg, vm, nextvcpu) < 0)
goto cleanup;
}
--
2.31.1
2 years
FOR GSOC
by ARPAN GUPTA
Hello Sir,
My Self Arpan Gupta percieving B.Tech from RKGIT ghaziabad for Cse(Ai-Ml)
, I have been intrested in Developing Apps using Android firebase framework
and studying solana block chain with rust and trying to implement with saga.
And if i am having knowledge of technology you work for I will learn it for
sure because I am good and fast learner.
I can hand on practice the technology in a week.
Other than coding I have discovered 3 astroide and registered citizen
scientist from NASA and I have intrested in astronomy
And I am President of my college coding ×Astronomy club NEBULA
and I want to contribute in redhat. I am planning to apply for GSOC , Can
someone guide me.
Regards
Arpan Gupta
2 years
[PATCH] qemu: add pcie-to-pci-bridge for q35 machines
by Oleg Vasilev
Hotplugging PCI devices on pc-i440fx machines is supported without
additional configuration. On q35, pcie-to-pci-bridge needs to be added
prior to the machine startup in order to support hotplug [1].
The idea is to support the same workflow for creating VMs in q35, as was
in pc. Namely, do not require additional configuration when hotplugging
is needed. Otherwise, all libvirt clients need to be updated which there
are a lot and they are maintained by different parties.
Instead, a pcie-to-pci-bridge better be created by default, so that PCI
slots are readily available. Might be a good idea to make it configurable
in the future.
Previously there was a pci-bridge present by default, but was removed in
d5fb8f4564 (qemu: don't add pci-bridge to Q35/arm domains unless it's needed, 2016-04-22)
[1]: https://libvirt.org/pci-hotplug.html
Signed-off-by: Oleg Vasilev <oleg.vasilev(a)virtuozzo.com>
---
src/qemu/qemu_domain.c | 19 +++--
.../boot-floppy-q35.x86_64-latest.args | 5 +-
.../cpu-host-model.x86_64-4.2.0.args | 9 +-
.../cpu-host-model.x86_64-5.0.0.args | 9 +-
.../cpu-host-model.x86_64-5.1.0.args | 9 +-
.../cpu-host-model.x86_64-5.2.0.args | 9 +-
.../cpu-host-model.x86_64-6.0.0.args | 9 +-
.../cpu-host-model.x86_64-6.1.0.args | 9 +-
.../cpu-host-model.x86_64-latest.args | 9 +-
.../disk-floppy-q35.x86_64-latest.args | 5 +-
...are-auto-bios-stateless.x86_64-latest.args | 2 +
.../firmware-auto-bios.x86_64-latest.args | 2 +
...-auto-efi-enrolled-keys.x86_64-latest.args | 2 +
...-auto-efi-loader-secure.x86_64-latest.args | 2 +
...to-efi-no-enrolled-keys.x86_64-latest.args | 2 +
...are-auto-efi-no-secboot.x86_64-latest.args | 2 +
...firmware-auto-efi-nvram.x86_64-latest.args | 2 +
...rmware-auto-efi-secboot.x86_64-latest.args | 2 +
...ware-auto-efi-stateless.x86_64-latest.args | 2 +
.../firmware-auto-efi.x86_64-latest.args | 2 +
...dev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args | 5 +-
...ev-scsi-vhost-scsi-pcie.x86_64-latest.args | 5 +-
.../intel-iommu-aw-bits.x86_64-latest.args | 2 +
.../qemuxml2argvdata/intel-iommu-aw-bits.xml | 9 ++
...ntel-iommu-caching-mode.x86_64-latest.args | 2 +
.../intel-iommu-caching-mode.xml | 9 ++
...ntel-iommu-device-iotlb.x86_64-latest.args | 2 +
.../intel-iommu-device-iotlb.xml | 9 ++
.../intel-iommu-eim.x86_64-latest.args | 2 +
tests/qemuxml2argvdata/intel-iommu-eim.xml | 9 ++
.../intel-iommu.x86_64-latest.args | 2 +
tests/qemuxml2argvdata/intel-iommu.xml | 9 ++
.../machine-smm-off.x86_64-latest.args | 2 +
.../machine-smm-on.x86_64-latest.args | 2 +
...q35-default-devices-only.x86_64-4.2.0.args | 9 +-
...35-default-devices-only.x86_64-latest.args | 9 +-
.../q35-pcie-autoadd.x86_64-4.2.0.args | 53 ++++++------
.../q35-pcie-autoadd.x86_64-latest.args | 53 ++++++------
.../q35-virt-manager-basic.x86_64-4.2.0.args | 21 ++---
.../q35-virt-manager-basic.x86_64-latest.args | 21 ++---
.../tseg-explicit-size.x86_64-latest.args | 9 +-
.../user-aliases2.x86_64-latest.args | 5 +-
.../virtio-iommu-x86_64.x86_64-latest.args | 4 +-
...virtio-non-transitional.x86_64-latest.args | 37 ++++----
.../virtio-transitional.x86_64-latest.args | 3 +-
...default-cpu-kvm-q35-4.2.x86_64-latest.args | 13 +--
...default-cpu-tcg-q35-4.2.x86_64-latest.args | 13 +--
.../x86_64-q35-graphics.x86_64-latest.args | 25 +++---
.../x86_64-q35-headless.x86_64-latest.args | 25 +++---
...ware-auto-bios-stateless.x86_64-latest.xml | 9 ++
.../firmware-auto-bios.x86_64-latest.xml | 9 ++
...e-auto-efi-enrolled-keys.x86_64-latest.xml | 9 ++
...e-auto-efi-loader-secure.x86_64-latest.xml | 9 ++
...uto-efi-no-enrolled-keys.x86_64-latest.xml | 9 ++
...ware-auto-efi-no-secboot.x86_64-latest.xml | 9 ++
.../firmware-auto-efi-nvram.x86_64-latest.xml | 9 ++
...irmware-auto-efi-secboot.x86_64-latest.xml | 9 ++
.../firmware-auto-efi.x86_64-latest.xml | 9 ++
...dev-scsi-vhost-scsi-pcie.x86_64-latest.xml | 10 ++-
.../machine-smm-off.x86_64-latest.xml | 9 ++
.../machine-smm-on.x86_64-latest.xml | 9 ++
.../net-isolated-port.x86_64-latest.xml | 18 ++--
...q35-default-devices-only.x86_64-latest.xml | 18 ++--
.../q35-pcie-autoadd.x86_64-latest.xml | 84 ++++++++++---------
.../q35-virt-manager-basic.x86_64-latest.xml | 36 ++++----
.../tseg-explicit-size.x86_64-latest.xml | 18 ++--
.../virtio-iommu-x86_64.x86_64-latest.xml | 11 ++-
.../virtio-non-transitional.x86_64-latest.xml | 60 ++++++-------
.../virtio-transitional.x86_64-latest.xml | 7 +-
...-default-cpu-kvm-q35-4.2.x86_64-latest.xml | 24 +++---
...-default-cpu-tcg-q35-4.2.x86_64-latest.xml | 24 +++---
.../x86_64-q35-graphics.x86_64-latest.xml | 46 +++++-----
.../x86_64-q35-headless.x86_64-latest.xml | 46 +++++-----
73 files changed, 621 insertions(+), 361 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 9ef6c8bb64..52a393e07f 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3890,6 +3890,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
bool addImplicitSATA = false;
bool addPCIRoot = false;
bool addPCIeRoot = false;
+ bool addPCIeToPCIBridge = false;
bool addDefaultMemballoon = true;
bool addDefaultUSBKBD = false;
bool addDefaultUSBMouse = false;
@@ -3910,6 +3911,8 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
if (qemuDomainIsQ35(def)) {
addPCIeRoot = true;
addImplicitSATA = true;
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE))
+ addPCIeToPCIBridge = true;
/* Prefer adding a USB3 controller if supported, fall back
* to USB2 if there is no USB3 available, and if that's
@@ -4046,11 +4049,7 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
}
}
- /* When a machine has a pcie-root, make sure that there is always
- * a dmi-to-pci-bridge controller added as bus 1, and a pci-bridge
- * as bus 2, so that standard PCI devices can be connected
- *
- * NB: any machine that sets addPCIeRoot to true must also return
+ /* NB: any machine that sets addPCIeRoot to true must also return
* true from the function qemuDomainSupportsPCI().
*/
if (addPCIeRoot) {
@@ -4069,6 +4068,16 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
}
}
+ /* Add a pcie-to-pci-bridge and pcie-root-port to plug it into. */
+ if (addPCIeToPCIBridge) {
+ if (virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 1,
+ VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT) < 0)
+ return -1;
+ if (virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 2,
+ VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE) < 0)
+ return -1;
+ }
+
if (addDefaultMemballoon && !def->memballoon) {
virDomainMemballoonDef *memballoon;
memballoon = g_new0(virDomainMemballoonDef, 1);
diff --git a/tests/qemuxml2argvdata/boot-floppy-q35.x86_64-latest.args b/tests/qemuxml2argvdata/boot-floppy-q35.x86_64-latest.args
index 7f34c7a965..75aae3254c 100644
--- a/tests/qemuxml2argvdata/boot-floppy-q35.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/boot-floppy-q35.x86_64-latest.args
@@ -28,8 +28,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
--device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.3","addr":"0x0"}' \
-device '{"driver":"isa-fdc","bootindexA":1}' \
-blockdev '{"driver":"file","filename":"/tmp/firmware.img","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.2.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.2.0.args
index 4b2b55be62..577ea9cd8a 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.2.0.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.2.0.args
@@ -27,10 +27,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
+-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
+-device pcie-root-port,port=9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
+-device pcie-root-port,port=10,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
+-device qemu-xhci,id=usb,bus=pci.3,addr=0x0 \
-audiodev '{"id":"audio1","driver":"none"}' \
--device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.0.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.0.0.args
index 2ea818cc13..838265acbf 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.0.0.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.0.0.args
@@ -27,10 +27,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
+-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
+-device pcie-root-port,port=9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
+-device pcie-root-port,port=10,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
+-device qemu-xhci,id=usb,bus=pci.3,addr=0x0 \
-audiodev '{"id":"audio1","driver":"none"}' \
--device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.1.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.1.0.args
index c6e2f345b8..50b8d56390 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.1.0.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.1.0.args
@@ -27,10 +27,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
+-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
+-device pcie-root-port,port=9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
+-device pcie-root-port,port=10,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
+-device qemu-xhci,id=usb,bus=pci.3,addr=0x0 \
-audiodev '{"id":"audio1","driver":"none"}' \
--device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.2.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.2.0.args
index 5bb6545e62..40302a86ee 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.2.0.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-5.2.0.args
@@ -28,10 +28,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
+-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
+-device pcie-root-port,port=9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
+-device pcie-root-port,port=10,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
+-device qemu-xhci,id=usb,bus=pci.3,addr=0x0 \
-audiodev '{"id":"audio1","driver":"none"}' \
--device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.0.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.0.0.args
index 57ae8a19d8..d39171386f 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.0.0.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.0.0.args
@@ -28,10 +28,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
+-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
+-device pcie-root-port,port=9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
+-device pcie-root-port,port=10,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
+-device qemu-xhci,id=usb,bus=pci.3,addr=0x0 \
-audiodev '{"id":"audio1","driver":"none"}' \
--device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.1.0.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.1.0.args
index baf0955027..3b0b09a93c 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.1.0.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-6.1.0.args
@@ -28,10 +28,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
+-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
+-device pcie-root-port,port=9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
+-device pcie-root-port,port=10,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
+-device qemu-xhci,id=usb,bus=pci.3,addr=0x0 \
-audiodev '{"id":"audio1","driver":"none"}' \
--device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args b/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args
index 853f0d9505..4a57f1dc98 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args
@@ -28,10 +28,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
--device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \
--device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"pcie-root-port","port":10,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x2"}' \
+-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.3","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
--device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x0"}' \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.4","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35.x86_64-latest.args b/tests/qemuxml2argvdata/disk-floppy-q35.x86_64-latest.args
index 810cc0796d..59da018898 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35.x86_64-latest.args
@@ -28,8 +28,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
--device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.3","addr":"0x0"}' \
-device '{"driver":"isa-fdc","bootindexA":1}' \
-blockdev '{"driver":"file","filename":"/tmp/firmware.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-2-format","read-only":false,"driver":"raw","file":"libvirt-2-storage"}' \
diff --git a/tests/qemuxml2argvdata/firmware-auto-bios-stateless.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-bios-stateless.x86_64-latest.args
index 1d45a8cfba..a27bfa997d 100644
--- a/tests/qemuxml2argvdata/firmware-auto-bios-stateless.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/firmware-auto-bios-stateless.x86_64-latest.args
@@ -27,6 +27,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/firmware-auto-bios.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-bios.x86_64-latest.args
index 1d45a8cfba..a27bfa997d 100644
--- a/tests/qemuxml2argvdata/firmware-auto-bios.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/firmware-auto-bios.x86_64-latest.args
@@ -27,6 +27,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-enrolled-keys.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-enrolled-keys.x86_64-latest.args
index 0b02464963..7dbed3af6e 100644
--- a/tests/qemuxml2argvdata/firmware-auto-efi-enrolled-keys.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/firmware-auto-efi-enrolled-keys.x86_64-latest.args
@@ -31,6 +31,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.x86_64-latest.args
index 0b02464963..7dbed3af6e 100644
--- a/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/firmware-auto-efi-loader-secure.x86_64-latest.args
@@ -31,6 +31,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args
index a1ef95ee03..9b24126035 100644
--- a/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.args
@@ -30,6 +30,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-no-secboot.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-no-secboot.x86_64-latest.args
index a1ef95ee03..9b24126035 100644
--- a/tests/qemuxml2argvdata/firmware-auto-efi-no-secboot.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/firmware-auto-efi-no-secboot.x86_64-latest.args
@@ -30,6 +30,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-nvram.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-nvram.x86_64-latest.args
index 3659889bf3..78871166a7 100644
--- a/tests/qemuxml2argvdata/firmware-auto-efi-nvram.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/firmware-auto-efi-nvram.x86_64-latest.args
@@ -31,6 +31,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-secboot.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-secboot.x86_64-latest.args
index 0b02464963..7dbed3af6e 100644
--- a/tests/qemuxml2argvdata/firmware-auto-efi-secboot.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/firmware-auto-efi-secboot.x86_64-latest.args
@@ -31,6 +31,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi-stateless.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi-stateless.x86_64-latest.args
index b79c141b18..5e36ff4854 100644
--- a/tests/qemuxml2argvdata/firmware-auto-efi-stateless.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/firmware-auto-efi-stateless.x86_64-latest.args
@@ -28,6 +28,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/firmware-auto-efi.x86_64-latest.args b/tests/qemuxml2argvdata/firmware-auto-efi.x86_64-latest.args
index 0b02464963..7dbed3af6e 100644
--- a/tests/qemuxml2argvdata/firmware-auto-efi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/firmware-auto-efi.x86_64-latest.args
@@ -31,6 +31,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args
index 992d8ec905..eec461d679 100644
--- a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args
+++ b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-4.2.0.args
@@ -27,8 +27,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \
-no-acpi \
-boot strict=on \
-device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
+-device pcie-root-port,port=9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
-audiodev '{"id":"audio1","driver":"none"}' \
--device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.1,addr=0x0 \
+-device vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.3,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.args b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.args
index 98b5e9b0ad..af1afcc455 100644
--- a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.args
@@ -28,8 +28,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest2/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
--device '{"driver":"vhost-scsi-pci","wwpn":"naa.5123456789abcde0","vhostfd":"3","id":"hostdev0","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"vhost-scsi-pci","wwpn":"naa.5123456789abcde0","vhostfd":"3","id":"hostdev0","bus":"pci.3","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/intel-iommu-aw-bits.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu-aw-bits.x86_64-latest.args
index 417b5fb9dc..dbcb8d7e93 100644
--- a/tests/qemuxml2argvdata/intel-iommu-aw-bits.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/intel-iommu-aw-bits.x86_64-latest.args
@@ -28,6 +28,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","aw-bits":48}' \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/intel-iommu-aw-bits.xml b/tests/qemuxml2argvdata/intel-iommu-aw-bits.xml
index b4eb81ff5d..6db13b476c 100644
--- a/tests/qemuxml2argvdata/intel-iommu-aw-bits.xml
+++ b/tests/qemuxml2argvdata/intel-iommu-aw-bits.xml
@@ -21,6 +21,15 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<controller type='usb' index='0' model='none'/>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
diff --git a/tests/qemuxml2argvdata/intel-iommu-caching-mode.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu-caching-mode.x86_64-latest.args
index bfcfc35e28..bc98aeb691 100644
--- a/tests/qemuxml2argvdata/intel-iommu-caching-mode.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/intel-iommu-caching-mode.x86_64-latest.args
@@ -28,6 +28,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","caching-mode":true}' \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/intel-iommu-caching-mode.xml b/tests/qemuxml2argvdata/intel-iommu-caching-mode.xml
index 4aa4bacf5b..9fb1bcdf8a 100644
--- a/tests/qemuxml2argvdata/intel-iommu-caching-mode.xml
+++ b/tests/qemuxml2argvdata/intel-iommu-caching-mode.xml
@@ -21,6 +21,15 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<controller type='usb' index='0' model='none'/>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
diff --git a/tests/qemuxml2argvdata/intel-iommu-device-iotlb.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu-device-iotlb.x86_64-latest.args
index 95cd9d26ef..9787ba9b1e 100644
--- a/tests/qemuxml2argvdata/intel-iommu-device-iotlb.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/intel-iommu-device-iotlb.x86_64-latest.args
@@ -28,6 +28,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","device-iotlb":true}' \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/intel-iommu-device-iotlb.xml b/tests/qemuxml2argvdata/intel-iommu-device-iotlb.xml
index e106737e6a..577bf9bbbd 100644
--- a/tests/qemuxml2argvdata/intel-iommu-device-iotlb.xml
+++ b/tests/qemuxml2argvdata/intel-iommu-device-iotlb.xml
@@ -21,6 +21,15 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<controller type='usb' index='0' model='none'/>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
diff --git a/tests/qemuxml2argvdata/intel-iommu-eim.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu-eim.x86_64-latest.args
index 12113a2800..a27b8c581b 100644
--- a/tests/qemuxml2argvdata/intel-iommu-eim.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/intel-iommu-eim.x86_64-latest.args
@@ -28,6 +28,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"intel-iommu","id":"iommu0","intremap":"on","eim":"on"}' \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/intel-iommu-eim.xml b/tests/qemuxml2argvdata/intel-iommu-eim.xml
index c4942e4c79..76a99bc7f9 100644
--- a/tests/qemuxml2argvdata/intel-iommu-eim.xml
+++ b/tests/qemuxml2argvdata/intel-iommu-eim.xml
@@ -21,6 +21,15 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<controller type='usb' index='0' model='none'/>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
diff --git a/tests/qemuxml2argvdata/intel-iommu.x86_64-latest.args b/tests/qemuxml2argvdata/intel-iommu.x86_64-latest.args
index c99efd229b..53c92f69c1 100644
--- a/tests/qemuxml2argvdata/intel-iommu.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/intel-iommu.x86_64-latest.args
@@ -28,6 +28,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"intel-iommu","id":"iommu0"}' \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/intel-iommu.xml b/tests/qemuxml2argvdata/intel-iommu.xml
index 8badf6c970..2aa3c5a3c0 100644
--- a/tests/qemuxml2argvdata/intel-iommu.xml
+++ b/tests/qemuxml2argvdata/intel-iommu.xml
@@ -18,6 +18,15 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='pci' index='0' model='pcie-root'/>
+ <controller type='pci' index='1' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<controller type='usb' index='0' model='none'/>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
diff --git a/tests/qemuxml2argvdata/machine-smm-off.x86_64-latest.args b/tests/qemuxml2argvdata/machine-smm-off.x86_64-latest.args
index 46f6a4a70c..737ed31919 100644
--- a/tests/qemuxml2argvdata/machine-smm-off.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/machine-smm-off.x86_64-latest.args
@@ -27,6 +27,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-shutdown \
-no-acpi \
-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args b/tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args
index 6fde375523..ced719d4e2 100644
--- a/tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/machine-smm-on.x86_64-latest.args
@@ -27,6 +27,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-shutdown \
-no-acpi \
-boot strict=on \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-4.2.0.args b/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-4.2.0.args
index a4de318a05..d2995d16d0 100644
--- a/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-4.2.0.args
+++ b/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-4.2.0.args
@@ -27,10 +27,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \
-no-acpi \
-boot strict=on \
-device pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device pcie-root-port,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
+-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
+-device pcie-root-port,port=9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
+-device pcie-root-port,port=10,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x2 \
+-device qemu-xhci,id=usb,bus=pci.3,addr=0x0 \
-audiodev '{"id":"audio1","driver":"none"}' \
--device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.4,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-latest.args b/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-latest.args
index ce5b2a216e..d3889717f4 100644
--- a/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/q35-default-devices-only.x86_64-latest.args
@@ -28,10 +28,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
--device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \
--device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"pcie-root-port","port":10,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x2"}' \
+-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.3","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
--device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x0"}' \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.4","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-4.2.0.args b/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-4.2.0.args
index 787cbfa511..1f629a0371 100644
--- a/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-4.2.0.args
+++ b/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-4.2.0.args
@@ -27,39 +27,40 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \
-no-acpi \
-boot strict=on \
-device pcie-root-port,port=16,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
--device pcie-root-port,port=17,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
--device pcie-root-port,port=18,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
--device pcie-root-port,port=19,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
--device pcie-root-port,port=20,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \
--device pcie-root-port,port=21,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \
--device pcie-root-port,port=22,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 \
--device pcie-root-port,port=23,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7 \
--device pcie-root-port,port=24,chassis=9,id=pci.9,bus=pcie.0,multifunction=on,addr=0x3 \
--device pcie-root-port,port=25,chassis=10,id=pci.10,bus=pcie.0,addr=0x3.0x1 \
--device pcie-root-port,port=26,chassis=11,id=pci.11,bus=pcie.0,addr=0x3.0x2 \
--device pcie-root-port,port=27,chassis=12,id=pci.12,bus=pcie.0,addr=0x3.0x3 \
--device pcie-root-port,port=28,chassis=13,id=pci.13,bus=pcie.0,addr=0x3.0x4 \
--device pcie-root-port,port=29,chassis=14,id=pci.14,bus=pcie.0,addr=0x3.0x5 \
--device nec-usb-xhci,id=usb,bus=pci.6,addr=0x0 \
--device virtio-scsi-pci,id=scsi0,bus=pci.5,addr=0x0 \
--device virtio-serial-pci,id=virtio-serial0,bus=pci.4,addr=0x0 \
+-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
+-device pcie-root-port,port=17,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x1 \
+-device pcie-root-port,port=18,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x2 \
+-device pcie-root-port,port=19,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x3 \
+-device pcie-root-port,port=20,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x4 \
+-device pcie-root-port,port=21,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x5 \
+-device pcie-root-port,port=22,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x6 \
+-device pcie-root-port,port=23,chassis=9,id=pci.9,bus=pcie.0,addr=0x2.0x7 \
+-device pcie-root-port,port=24,chassis=10,id=pci.10,bus=pcie.0,multifunction=on,addr=0x3 \
+-device pcie-root-port,port=25,chassis=11,id=pci.11,bus=pcie.0,addr=0x3.0x1 \
+-device pcie-root-port,port=26,chassis=12,id=pci.12,bus=pcie.0,addr=0x3.0x2 \
+-device pcie-root-port,port=27,chassis=13,id=pci.13,bus=pcie.0,addr=0x3.0x3 \
+-device pcie-root-port,port=28,chassis=14,id=pci.14,bus=pcie.0,addr=0x3.0x4 \
+-device pcie-root-port,port=29,chassis=15,id=pci.15,bus=pcie.0,addr=0x3.0x5 \
+-device nec-usb-xhci,id=usb,bus=pci.8,addr=0x0 \
+-device virtio-scsi-pci,id=scsi0,bus=pci.7,addr=0x0 \
+-device virtio-serial-pci,id=virtio-serial0,bus=pci.6,addr=0x0 \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
--device virtio-blk-pci,scsi=off,bus=pci.7,addr=0x0,drive=libvirt-1-format,id=virtio-disk1,bootindex=1 \
+-device virtio-blk-pci,scsi=off,bus=pci.9,addr=0x0,drive=libvirt-1-format,id=virtio-disk1,bootindex=1 \
-fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/to/guest \
--device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=/import/from/host,bus=pci.1,addr=0x0 \
+-device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=/import/from/host,bus=pci.3,addr=0x0 \
-netdev user,id=hostnet0 \
--device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:11:22:33:44:55,bus=pci.2,addr=0x0 \
+-device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:11:22:33:44:55,bus=pci.4,addr=0x0 \
-netdev user,id=hostnet1 \
--device e1000e,netdev=hostnet1,id=net1,mac=00:11:22:33:44:66,bus=pci.3,addr=0x0 \
--device virtio-input-host-pci,id=input0,evdev=/dev/input/event1234,bus=pci.10,addr=0x0 \
--device virtio-mouse-pci,id=input1,bus=pci.11,addr=0x0 \
--device virtio-keyboard-pci,id=input2,bus=pci.12,addr=0x0 \
--device virtio-tablet-pci,id=input3,bus=pci.13,addr=0x0 \
+-device e1000e,netdev=hostnet1,id=net1,mac=00:11:22:33:44:66,bus=pci.5,addr=0x0 \
+-device virtio-input-host-pci,id=input0,evdev=/dev/input/event1234,bus=pci.12,addr=0x0 \
+-device virtio-mouse-pci,id=input1,bus=pci.13,addr=0x0 \
+-device virtio-keyboard-pci,id=input2,bus=pci.14,addr=0x0 \
+-device virtio-tablet-pci,id=input3,bus=pci.15,addr=0x0 \
-audiodev '{"id":"audio1","driver":"none"}' \
-device virtio-vga,id=video0,max_outputs=1,bus=pcie.0,addr=0x1 \
--device virtio-balloon-pci,id=balloon0,bus=pci.8,addr=0x0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.10,addr=0x0 \
-object rng-random,id=objrng0,filename=/dev/urandom \
--device virtio-rng-pci,rng=objrng0,id=rng0,max-bytes=123,period=1234,bus=pci.9,addr=0x0 \
+-device virtio-rng-pci,rng=objrng0,id=rng0,max-bytes=123,period=1234,bus=pci.11,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-latest.args b/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-latest.args
index 7992c33ace..4dd06294f5 100644
--- a/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/q35-pcie-autoadd.x86_64-latest.args
@@ -28,39 +28,40 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-q35-test/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \
--device '{"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"}' \
--device '{"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"}' \
--device '{"driver":"pcie-root-port","port":19,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x3"}' \
--device '{"driver":"pcie-root-port","port":20,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x4"}' \
--device '{"driver":"pcie-root-port","port":21,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x2.0x5"}' \
--device '{"driver":"pcie-root-port","port":22,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x2.0x6"}' \
--device '{"driver":"pcie-root-port","port":23,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x2.0x7"}' \
--device '{"driver":"pcie-root-port","port":24,"chassis":9,"id":"pci.9","bus":"pcie.0","multifunction":true,"addr":"0x3"}' \
--device '{"driver":"pcie-root-port","port":25,"chassis":10,"id":"pci.10","bus":"pcie.0","addr":"0x3.0x1"}' \
--device '{"driver":"pcie-root-port","port":26,"chassis":11,"id":"pci.11","bus":"pcie.0","addr":"0x3.0x2"}' \
--device '{"driver":"pcie-root-port","port":27,"chassis":12,"id":"pci.12","bus":"pcie.0","addr":"0x3.0x3"}' \
--device '{"driver":"pcie-root-port","port":28,"chassis":13,"id":"pci.13","bus":"pcie.0","addr":"0x3.0x4"}' \
--device '{"driver":"pcie-root-port","port":29,"chassis":14,"id":"pci.14","bus":"pcie.0","addr":"0x3.0x5"}' \
--device '{"driver":"nec-usb-xhci","id":"usb","bus":"pci.6","addr":"0x0"}' \
--device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.5","addr":"0x0"}' \
--device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.4","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":17,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x1"}' \
+-device '{"driver":"pcie-root-port","port":18,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x2"}' \
+-device '{"driver":"pcie-root-port","port":19,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x3"}' \
+-device '{"driver":"pcie-root-port","port":20,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x2.0x4"}' \
+-device '{"driver":"pcie-root-port","port":21,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x2.0x5"}' \
+-device '{"driver":"pcie-root-port","port":22,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x2.0x6"}' \
+-device '{"driver":"pcie-root-port","port":23,"chassis":9,"id":"pci.9","bus":"pcie.0","addr":"0x2.0x7"}' \
+-device '{"driver":"pcie-root-port","port":24,"chassis":10,"id":"pci.10","bus":"pcie.0","multifunction":true,"addr":"0x3"}' \
+-device '{"driver":"pcie-root-port","port":25,"chassis":11,"id":"pci.11","bus":"pcie.0","addr":"0x3.0x1"}' \
+-device '{"driver":"pcie-root-port","port":26,"chassis":12,"id":"pci.12","bus":"pcie.0","addr":"0x3.0x2"}' \
+-device '{"driver":"pcie-root-port","port":27,"chassis":13,"id":"pci.13","bus":"pcie.0","addr":"0x3.0x3"}' \
+-device '{"driver":"pcie-root-port","port":28,"chassis":14,"id":"pci.14","bus":"pcie.0","addr":"0x3.0x4"}' \
+-device '{"driver":"pcie-root-port","port":29,"chassis":15,"id":"pci.15","bus":"pcie.0","addr":"0x3.0x5"}' \
+-device '{"driver":"nec-usb-xhci","id":"usb","bus":"pci.8","addr":"0x0"}' \
+-device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.7","addr":"0x0"}' \
+-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.6","addr":"0x0"}' \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
--device '{"driver":"virtio-blk-pci","bus":"pci.7","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk1","bootindex":1}' \
+-device '{"driver":"virtio-blk-pci","bus":"pci.9","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk1","bootindex":1}' \
-fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/to/guest \
--device '{"driver":"virtio-9p-pci","id":"fs0","fsdev":"fsdev-fs0","mount_tag":"/import/from/host","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"virtio-9p-pci","id":"fs0","fsdev":"fsdev-fs0","mount_tag":"/import/from/host","bus":"pci.3","addr":"0x0"}' \
-netdev user,id=hostnet0 \
--device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.2","addr":"0x0"}' \
+-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.4","addr":"0x0"}' \
-netdev user,id=hostnet1 \
--device '{"driver":"e1000e","netdev":"hostnet1","id":"net1","mac":"00:11:22:33:44:66","bus":"pci.3","addr":"0x0"}' \
--device '{"driver":"virtio-input-host-pci","id":"input0","evdev":"/dev/input/event1234","bus":"pci.10","addr":"0x0"}' \
--device '{"driver":"virtio-mouse-pci","id":"input1","bus":"pci.11","addr":"0x0"}' \
--device '{"driver":"virtio-keyboard-pci","id":"input2","bus":"pci.12","addr":"0x0"}' \
--device '{"driver":"virtio-tablet-pci","id":"input3","bus":"pci.13","addr":"0x0"}' \
+-device '{"driver":"e1000e","netdev":"hostnet1","id":"net1","mac":"00:11:22:33:44:66","bus":"pci.5","addr":"0x0"}' \
+-device '{"driver":"virtio-input-host-pci","id":"input0","evdev":"/dev/input/event1234","bus":"pci.12","addr":"0x0"}' \
+-device '{"driver":"virtio-mouse-pci","id":"input1","bus":"pci.13","addr":"0x0"}' \
+-device '{"driver":"virtio-keyboard-pci","id":"input2","bus":"pci.14","addr":"0x0"}' \
+-device '{"driver":"virtio-tablet-pci","id":"input3","bus":"pci.15","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-device '{"driver":"virtio-vga","id":"video0","max_outputs":1,"bus":"pcie.0","addr":"0x1"}' \
--device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.8","addr":"0x0"}' \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.10","addr":"0x0"}' \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \
--device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","max-bytes":123,"period":1234,"bus":"pci.9","addr":"0x0"}' \
+-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","max-bytes":123,"period":1234,"bus":"pci.11","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args
index 14093a3f80..b67790f066 100644
--- a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args
+++ b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args
@@ -29,18 +29,19 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-virt-manager-basic/.config \
-global ICH9-LPC.disable_s4=1 \
-boot strict=on \
-device pcie-root-port,port=16,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
--device pcie-root-port,port=17,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
--device pcie-root-port,port=18,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
--device pcie-root-port,port=19,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
--device pcie-root-port,port=20,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \
--device pcie-root-port,port=21,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \
--device nec-usb-xhci,id=usb,bus=pci.2,addr=0x0 \
--device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \
+-device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
+-device pcie-root-port,port=17,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x1 \
+-device pcie-root-port,port=18,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x2 \
+-device pcie-root-port,port=19,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x3 \
+-device pcie-root-port,port=20,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x4 \
+-device pcie-root-port,port=21,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x5 \
+-device nec-usb-xhci,id=usb,bus=pci.4,addr=0x0 \
+-device virtio-serial-pci,id=virtio-serial0,bus=pci.5,addr=0x0 \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/basic.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \
--device virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \
+-device virtio-blk-pci,scsi=off,bus=pci.6,addr=0x0,drive=libvirt-1-format,id=virtio-disk0,bootindex=1 \
-netdev user,id=hostnet0 \
--device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:9a:e6:c6,bus=pci.1,addr=0x0 \
+-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:9a:e6:c6,bus=pci.3,addr=0x0 \
-chardev pty,id=charserial0 \
-device isa-serial,chardev=charserial0,id=serial0,index=0 \
-chardev socket,id=charchannel0,fd=1729,server=on,wait=off \
@@ -57,6 +58,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-virt-manager-basic/.config \
-device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 \
-chardev spicevmc,id=charredir1,name=usbredir \
-device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 \
--device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.7,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args
index 77a7cf5e4f..02f3ef021f 100644
--- a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args
@@ -30,18 +30,19 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-virt-manager-basic/.config \
-global ICH9-LPC.disable_s4=1 \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \
--device '{"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"}' \
--device '{"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"}' \
--device '{"driver":"pcie-root-port","port":19,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x3"}' \
--device '{"driver":"pcie-root-port","port":20,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x4"}' \
--device '{"driver":"pcie-root-port","port":21,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x2.0x5"}' \
--device '{"driver":"nec-usb-xhci","id":"usb","bus":"pci.2","addr":"0x0"}' \
--device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":17,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x1"}' \
+-device '{"driver":"pcie-root-port","port":18,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x2"}' \
+-device '{"driver":"pcie-root-port","port":19,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x3"}' \
+-device '{"driver":"pcie-root-port","port":20,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x2.0x4"}' \
+-device '{"driver":"pcie-root-port","port":21,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x2.0x5"}' \
+-device '{"driver":"nec-usb-xhci","id":"usb","bus":"pci.4","addr":"0x0"}' \
+-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.5","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/basic.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \
--device '{"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
+-device '{"driver":"virtio-blk-pci","bus":"pci.6","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-netdev user,id=hostnet0 \
--device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:9a:e6:c6","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:9a:e6:c6","bus":"pci.3","addr":"0x0"}' \
-chardev pty,id=charserial0 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
-chardev socket,id=charchannel0,fd=1729,server=on,wait=off \
@@ -58,6 +59,6 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-virt-manager-basic/.config \
-device '{"driver":"usb-redir","chardev":"charredir0","id":"redir0","bus":"usb.0","port":"2"}' \
-chardev spicevmc,id=charredir1,name=usbredir \
-device '{"driver":"usb-redir","chardev":"charredir1","id":"redir1","bus":"usb.0","port":"3"}' \
--device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"}' \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.7","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args b/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
index 3371199be5..a3b6fab557 100644
--- a/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
@@ -29,10 +29,11 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
--device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \
--device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"pcie-root-port","port":10,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x2"}' \
+-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.3","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
--device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.2","addr":"0x0"}' \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.4","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/user-aliases2.x86_64-latest.args b/tests/qemuxml2argvdata/user-aliases2.x86_64-latest.args
index 7f34c7a965..75aae3254c 100644
--- a/tests/qemuxml2argvdata/user-aliases2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/user-aliases2.x86_64-latest.args
@@ -28,8 +28,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
--device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.3","addr":"0x0"}' \
-device '{"driver":"isa-fdc","bootindexA":1}' \
-blockdev '{"driver":"file","filename":"/tmp/firmware.img","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
diff --git a/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args
index 744367c6c0..0149b63cd5 100644
--- a/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-iommu-x86_64.x86_64-latest.args
@@ -26,7 +26,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-rtc base=utc \
-no-shutdown \
-boot strict=on \
--device '{"driver":"virtio-iommu","id":"iommu0","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"virtio-iommu","id":"iommu0","bus":"pcie.0","addr":"0x2"}' \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
index 541c074871..18f83e6fe4 100644
--- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
@@ -28,29 +28,30 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-acpi \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
--device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \
--device '{"driver":"pcie-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"}' \
--device '{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x4"}' \
--device '{"driver":"pcie-root-port","port":13,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x1.0x5"}' \
--device '{"driver":"pcie-root-port","port":14,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x1.0x6"}' \
--device '{"driver":"pcie-root-port","port":15,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x1.0x7"}' \
--device '{"driver":"pcie-root-port","port":16,"chassis":9,"id":"pci.9","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \
--device '{"driver":"pcie-root-port","port":17,"chassis":10,"id":"pci.10","bus":"pcie.0","addr":"0x2.0x1"}' \
--device '{"driver":"virtio-scsi-pci-non-transitional","id":"scsi0","bus":"pci.4","addr":"0x0"}' \
--device '{"driver":"virtio-serial-pci-non-transitional","id":"virtio-serial0","bus":"pci.3","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"pcie-root-port","port":10,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x2"}' \
+-device '{"driver":"pcie-root-port","port":11,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x3"}' \
+-device '{"driver":"pcie-root-port","port":12,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x1.0x4"}' \
+-device '{"driver":"pcie-root-port","port":13,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x1.0x5"}' \
+-device '{"driver":"pcie-root-port","port":14,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x1.0x6"}' \
+-device '{"driver":"pcie-root-port","port":15,"chassis":9,"id":"pci.9","bus":"pcie.0","addr":"0x1.0x7"}' \
+-device '{"driver":"pcie-root-port","port":16,"chassis":10,"id":"pci.10","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \
+-device '{"driver":"pcie-root-port","port":17,"chassis":11,"id":"pci.11","bus":"pcie.0","addr":"0x2.0x1"}' \
+-device '{"driver":"virtio-scsi-pci-non-transitional","id":"scsi0","bus":"pci.6","addr":"0x0"}' \
+-device '{"driver":"virtio-serial-pci-non-transitional","id":"virtio-serial0","bus":"pci.5","addr":"0x0"}' \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"raw","file":"libvirt-1-storage"}' \
--device '{"driver":"virtio-blk-pci-non-transitional","bus":"pci.5","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
+-device '{"driver":"virtio-blk-pci-non-transitional","bus":"pci.7","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-fsdev local,security_model=passthrough,id=fsdev-fs0,path=/export/fs1 \
--device '{"driver":"virtio-9p-pci-non-transitional","id":"fs0","fsdev":"fsdev-fs0","mount_tag":"fs1","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"virtio-9p-pci-non-transitional","id":"fs0","fsdev":"fsdev-fs0","mount_tag":"fs1","bus":"pci.3","addr":"0x0"}' \
-netdev user,id=hostnet0 \
--device '{"driver":"virtio-net-pci-non-transitional","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.2","addr":"0x0"}' \
+-device '{"driver":"virtio-net-pci-non-transitional","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.4","addr":"0x0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
--device '{"driver":"vhost-scsi-pci-non-transitional","wwpn":"naa.5123456789abcde0","vhostfd":"3","id":"hostdev0","bus":"pci.6","addr":"0x0"}' \
--device '{"driver":"virtio-balloon-pci-non-transitional","id":"balloon0","bus":"pci.7","addr":"0x0"}' \
+-device '{"driver":"vhost-scsi-pci-non-transitional","wwpn":"naa.5123456789abcde0","vhostfd":"3","id":"hostdev0","bus":"pci.8","addr":"0x0"}' \
+-device '{"driver":"virtio-balloon-pci-non-transitional","id":"balloon0","bus":"pci.9","addr":"0x0"}' \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \
--device '{"driver":"virtio-rng-pci-non-transitional","rng":"objrng0","id":"rng0","bus":"pci.8","addr":"0x0"}' \
+-device '{"driver":"virtio-rng-pci-non-transitional","rng":"objrng0","id":"rng0","bus":"pci.10","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
--device '{"driver":"vhost-vsock-pci-non-transitional","id":"vsock0","guest-cid":4,"vhostfd":"6789","bus":"pci.9","addr":"0x0"}' \
+-device '{"driver":"vhost-vsock-pci-non-transitional","id":"vsock0","guest-cid":4,"vhostfd":"6789","bus":"pci.11","addr":"0x0"}' \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
index 6d18698ec7..a5730e9059 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
@@ -27,9 +27,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-no-shutdown \
-no-acpi \
-boot strict=on \
--device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
+-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","addr":"0x1"}' \
-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
-device '{"driver":"virtio-scsi-pci-transitional","id":"scsi0","bus":"pci.2","addr":"0x4"}' \
-device '{"driver":"virtio-serial-pci-transitional","id":"virtio-serial0","bus":"pci.2","addr":"0x3"}' \
-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args
index 0368ecc699..b5cf29038f 100644
--- a/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.args
@@ -27,14 +27,15 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
-no-shutdown \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
--device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \
--device '{"driver":"pcie-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"}' \
--device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"pcie-root-port","port":10,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x2"}' \
+-device '{"driver":"pcie-root-port","port":11,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x3"}' \
+-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.3","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \
--device '{"driver":"virtio-blk-pci","bus":"pci.2","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
+-device '{"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
--device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.3","addr":"0x0"}' \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args
index c2eb8066df..4a3169e2a8 100644
--- a/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.args
@@ -27,14 +27,15 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
-no-shutdown \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
--device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \
--device '{"driver":"pcie-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"}' \
--device '{"driver":"qemu-xhci","id":"usb","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"pcie-root-port","port":10,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x2"}' \
+-device '{"driver":"pcie-root-port","port":11,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x3"}' \
+-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.3","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \
--device '{"driver":"virtio-blk-pci","bus":"pci.2","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
+-device '{"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-audiodev '{"id":"audio1","driver":"none"}' \
--device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.3","addr":"0x0"}' \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
index 37a1afb897..31796d9fb6 100644
--- a/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
@@ -30,19 +30,20 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
-global ICH9-LPC.disable_s4=1 \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":16,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x2"}' \
--device '{"driver":"pcie-root-port","port":17,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x2.0x1"}' \
--device '{"driver":"pcie-root-port","port":18,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x2"}' \
--device '{"driver":"pcie-root-port","port":19,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x3"}' \
--device '{"driver":"pcie-root-port","port":20,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x4"}' \
--device '{"driver":"pcie-root-port","port":21,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x2.0x5"}' \
--device '{"driver":"pcie-root-port","port":22,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x2.0x6"}' \
--device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","addr":"0x0"}' \
--device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":17,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x2.0x1"}' \
+-device '{"driver":"pcie-root-port","port":18,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x2.0x2"}' \
+-device '{"driver":"pcie-root-port","port":19,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x2.0x3"}' \
+-device '{"driver":"pcie-root-port","port":20,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x2.0x4"}' \
+-device '{"driver":"pcie-root-port","port":21,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x2.0x5"}' \
+-device '{"driver":"pcie-root-port","port":22,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x2.0x6"}' \
+-device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.4","addr":"0x0"}' \
+-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.5","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \
--device '{"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
+-device '{"driver":"virtio-blk-pci","bus":"pci.6","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-netdev user,id=hostnet0 \
--device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:d2:70:0b","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:d2:70:0b","bus":"pci.3","addr":"0x0"}' \
-chardev pty,id=charserial0 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
-chardev socket,id=charchannel0,fd=1729,server=on,wait=off \
@@ -51,8 +52,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
-audiodev '{"id":"audio1","driver":"none"}' \
-vnc 127.0.0.1:0,audiodev=audio1 \
-device '{"driver":"qxl-vga","id":"video0","max_outputs":1,"ram_size":67108864,"vram_size":67108864,"vram64_size_mb":0,"vgamem_mb":16,"bus":"pcie.0","addr":"0x1"}' \
--device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"}' \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.7","addr":"0x0"}' \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \
--device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.6","addr":"0x0"}' \
+-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.8","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
index b4d90dff5e..6efcbf7943 100644
--- a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
@@ -31,26 +31,27 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
-global ICH9-LPC.disable_s4=1 \
-boot strict=on \
-device '{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' \
--device '{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' \
--device '{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' \
--device '{"driver":"pcie-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"}' \
--device '{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x4"}' \
--device '{"driver":"pcie-root-port","port":13,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x1.0x5"}' \
--device '{"driver":"pcie-root-port","port":14,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x1.0x6"}' \
--device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","addr":"0x0"}' \
--device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3","addr":"0x0"}' \
+-device '{"driver":"pcie-pci-bridge","id":"pci.2","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"pcie-root-port","port":9,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x1"}' \
+-device '{"driver":"pcie-root-port","port":10,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x2"}' \
+-device '{"driver":"pcie-root-port","port":11,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x3"}' \
+-device '{"driver":"pcie-root-port","port":12,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x1.0x4"}' \
+-device '{"driver":"pcie-root-port","port":13,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x1.0x5"}' \
+-device '{"driver":"pcie-root-port","port":14,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x1.0x6"}' \
+-device '{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.4","addr":"0x0"}' \
+-device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.5","addr":"0x0"}' \
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/guest.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \
--device '{"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
+-device '{"driver":"virtio-blk-pci","bus":"pci.6","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' \
-netdev user,id=hostnet0 \
--device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.1","addr":"0x0"}' \
+-device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:09:a4:37","bus":"pci.3","addr":"0x0"}' \
-chardev pty,id=charserial0 \
-device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
-chardev socket,id=charchannel0,fd=1729,server=on,wait=off \
-device '{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' \
-audiodev '{"id":"audio1","driver":"none"}' \
--device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"}' \
+-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.7","addr":"0x0"}' \
-object '{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' \
--device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.6","addr":"0x0"}' \
+-device '{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.8","addr":"0x0"}' \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
diff --git a/tests/qemuxml2xmloutdata/firmware-auto-bios-stateless.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-bios-stateless.x86_64-latest.xml
index f1b5516ce4..88d9581502 100644
--- a/tests/qemuxml2xmloutdata/firmware-auto-bios-stateless.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/firmware-auto-bios-stateless.x86_64-latest.xml
@@ -26,6 +26,15 @@
<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='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
diff --git a/tests/qemuxml2xmloutdata/firmware-auto-bios.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-bios.x86_64-latest.xml
index 722294089e..0c789d4af2 100644
--- a/tests/qemuxml2xmloutdata/firmware-auto-bios.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/firmware-auto-bios.x86_64-latest.xml
@@ -25,6 +25,15 @@
<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='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-enrolled-keys.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-enrolled-keys.x86_64-latest.xml
index 8dcc741c1e..015fadb74d 100644
--- a/tests/qemuxml2xmloutdata/firmware-auto-efi-enrolled-keys.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-enrolled-keys.x86_64-latest.xml
@@ -29,6 +29,15 @@
<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='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-loader-secure.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-loader-secure.x86_64-latest.xml
index 26e30d7f64..c5674b3da3 100644
--- a/tests/qemuxml2xmloutdata/firmware-auto-efi-loader-secure.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-loader-secure.x86_64-latest.xml
@@ -26,6 +26,15 @@
<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='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml
index e5d307e0b2..573f86be71 100644
--- a/tests/qemuxml2xmloutdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-no-enrolled-keys.x86_64-latest.xml
@@ -28,6 +28,15 @@
<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='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-no-secboot.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-no-secboot.x86_64-latest.xml
index 1528ebcfe0..a9c556c573 100644
--- a/tests/qemuxml2xmloutdata/firmware-auto-efi-no-secboot.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-no-secboot.x86_64-latest.xml
@@ -28,6 +28,15 @@
<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='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-nvram.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-nvram.x86_64-latest.xml
index abd6ec079d..ed24ef11a4 100644
--- a/tests/qemuxml2xmloutdata/firmware-auto-efi-nvram.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-nvram.x86_64-latest.xml
@@ -26,6 +26,15 @@
<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='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi-secboot.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi-secboot.x86_64-latest.xml
index ef24e04b61..f4c61b67b0 100644
--- a/tests/qemuxml2xmloutdata/firmware-auto-efi-secboot.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/firmware-auto-efi-secboot.x86_64-latest.xml
@@ -28,6 +28,15 @@
<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='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
diff --git a/tests/qemuxml2xmloutdata/firmware-auto-efi.x86_64-latest.xml b/tests/qemuxml2xmloutdata/firmware-auto-efi.x86_64-latest.xml
index 7e2e40036e..c0a39927aa 100644
--- a/tests/qemuxml2xmloutdata/firmware-auto-efi.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/firmware-auto-efi.x86_64-latest.xml
@@ -25,6 +25,15 @@
<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='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
diff --git a/tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.xml b/tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.xml
index 032b4ce030..2e0f52891f 100644
--- a/tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/hostdev-scsi-vhost-scsi-pcie.x86_64-latest.xml
@@ -27,9 +27,13 @@
<target chassis='1' port='0x8'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
</controller>
- <controller type='pci' index='2' model='pcie-root-port'>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='2' port='0x9'/>
+ <target chassis='3' port='0x9'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<input type='mouse' bus='ps2'/>
@@ -37,7 +41,7 @@
<audio id='1' type='none'/>
<hostdev mode='subsystem' type='scsi_host' managed='no'>
<source protocol='vhost' wwpn='naa.5123456789abcde0'/>
- <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</hostdev>
<memballoon model='none'/>
</devices>
diff --git a/tests/qemuxml2xmloutdata/machine-smm-off.x86_64-latest.xml b/tests/qemuxml2xmloutdata/machine-smm-off.x86_64-latest.xml
index 77b0b39750..bd493f411f 100644
--- a/tests/qemuxml2xmloutdata/machine-smm-off.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/machine-smm-off.x86_64-latest.xml
@@ -25,6 +25,15 @@
<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='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
diff --git a/tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml b/tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml
index 7c7df9e06d..e43cc6500f 100644
--- a/tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/machine-smm-on.x86_64-latest.xml
@@ -25,6 +25,15 @@
<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='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
diff --git a/tests/qemuxml2xmloutdata/net-isolated-port.x86_64-latest.xml b/tests/qemuxml2xmloutdata/net-isolated-port.x86_64-latest.xml
index b2eb8516b8..7072879f25 100644
--- a/tests/qemuxml2xmloutdata/net-isolated-port.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/net-isolated-port.x86_64-latest.xml
@@ -25,7 +25,7 @@
</disk>
<controller type='pci' index='0' model='pcie-root'/>
<controller type='usb' index='0' model='qemu-xhci'>
- <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
@@ -35,14 +35,18 @@
<target chassis='1' port='0x10'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
</controller>
- <controller type='pci' index='2' model='pcie-root-port'>
- <model name='pcie-root-port'/>
- <target chassis='2' port='0x11'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='3' port='0x12'/>
+ <target chassis='3' port='0x11'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
+ </controller>
+ <controller type='pci' index='4' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='4' port='0x12'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
</controller>
<interface type='network'>
@@ -50,7 +54,7 @@
<source network='default'/>
<port isolated='yes'/>
<model type='virtio'/>
- <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
diff --git a/tests/qemuxml2xmloutdata/q35-default-devices-only.x86_64-latest.xml b/tests/qemuxml2xmloutdata/q35-default-devices-only.x86_64-latest.xml
index 5540ad1147..386df5920c 100644
--- a/tests/qemuxml2xmloutdata/q35-default-devices-only.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/q35-default-devices-only.x86_64-latest.xml
@@ -18,7 +18,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' index='0' model='qemu-xhci'>
- <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
@@ -29,21 +29,25 @@
<target chassis='1' port='0x8'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
</controller>
- <controller type='pci' index='2' model='pcie-root-port'>
- <model name='pcie-root-port'/>
- <target chassis='2' port='0x9'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='3' port='0xa'/>
+ <target chassis='3' port='0x9'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ </controller>
+ <controller type='pci' index='4' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='4' port='0xa'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
<memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</memballoon>
</devices>
</domain>
diff --git a/tests/qemuxml2xmloutdata/q35-pcie-autoadd.x86_64-latest.xml b/tests/qemuxml2xmloutdata/q35-pcie-autoadd.x86_64-latest.xml
index 3037902354..725756b8fc 100644
--- a/tests/qemuxml2xmloutdata/q35-pcie-autoadd.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/q35-pcie-autoadd.x86_64-latest.xml
@@ -21,16 +21,16 @@
<driver name='qemu' type='raw'/>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='vdb' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
</disk>
<controller type='virtio-serial' index='0'>
- <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</controller>
<controller type='scsi' index='0' model='virtio-scsi'>
- <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</controller>
<controller type='usb' index='0' model='nec-xhci'>
- <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
@@ -41,98 +41,102 @@
<target chassis='1' port='0x10'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
</controller>
- <controller type='pci' index='2' model='pcie-root-port'>
- <model name='pcie-root-port'/>
- <target chassis='2' port='0x11'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='3' port='0x12'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
+ <target chassis='3' port='0x11'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
</controller>
<controller type='pci' index='4' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='4' port='0x13'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
+ <target chassis='4' port='0x12'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='5' port='0x14'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
+ <target chassis='5' port='0x13'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
</controller>
<controller type='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='6' port='0x15'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
+ <target chassis='6' port='0x14'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
</controller>
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='7' port='0x16'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
+ <target chassis='7' port='0x15'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
</controller>
<controller type='pci' index='8' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='8' port='0x17'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
+ <target chassis='8' port='0x16'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
</controller>
<controller type='pci' index='9' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='9' port='0x18'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
+ <target chassis='9' port='0x17'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
</controller>
<controller type='pci' index='10' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='10' port='0x19'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
+ <target chassis='10' port='0x18'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
</controller>
<controller type='pci' index='11' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='11' port='0x1a'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
+ <target chassis='11' port='0x19'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
</controller>
<controller type='pci' index='12' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='12' port='0x1b'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
+ <target chassis='12' port='0x1a'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
</controller>
<controller type='pci' index='13' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='13' port='0x1c'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
+ <target chassis='13' port='0x1b'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
</controller>
<controller type='pci' index='14' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='14' port='0x1d'/>
+ <target chassis='14' port='0x1c'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
+ </controller>
+ <controller type='pci' index='15' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='15' port='0x1d'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
</controller>
<filesystem type='mount' accessmode='passthrough'>
<source dir='/export/to/guest'/>
<target dir='/import/from/host'/>
- <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</filesystem>
<interface type='user'>
<mac address='00:11:22:33:44:55'/>
<model type='virtio'/>
- <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</interface>
<interface type='user'>
<mac address='00:11:22:33:44:66'/>
<model type='e1000e'/>
- <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</interface>
<input type='passthrough' bus='virtio'>
<source evdev='/dev/input/event1234'/>
- <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/>
</input>
<input type='mouse' bus='virtio'>
- <address type='pci' domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x0d' slot='0x00' function='0x0'/>
</input>
<input type='keyboard' bus='virtio'>
- <address type='pci' domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x0e' slot='0x00' function='0x0'/>
</input>
<input type='tablet' bus='virtio'>
- <address type='pci' domain='0x0000' bus='0x0d' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x0f' slot='0x00' function='0x0'/>
</input>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
@@ -142,12 +146,12 @@
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</video>
<memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
</memballoon>
<rng model='virtio'>
<rate bytes='123' period='1234'/>
<backend model='random'>/dev/urandom</backend>
- <address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
</rng>
</devices>
</domain>
diff --git a/tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.xml b/tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.xml
index 62289d4800..40e5fdd975 100644
--- a/tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.xml
@@ -34,16 +34,16 @@
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/basic.qcow2'/>
<target dev='vda' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</disk>
<controller type='usb' index='0' model='nec-xhci'>
- <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
</controller>
<controller type='virtio-serial' index='0'>
- <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='0' model='pcie-root'/>
<controller type='pci' index='1' model='pcie-root-port'>
@@ -51,35 +51,39 @@
<target chassis='1' port='0x10'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
</controller>
- <controller type='pci' index='2' model='pcie-root-port'>
- <model name='pcie-root-port'/>
- <target chassis='2' port='0x11'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='3' port='0x12'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
+ <target chassis='3' port='0x11'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
</controller>
<controller type='pci' index='4' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='4' port='0x13'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
+ <target chassis='4' port='0x12'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='5' port='0x14'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
+ <target chassis='5' port='0x13'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
</controller>
<controller type='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='6' port='0x15'/>
+ <target chassis='6' port='0x14'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
+ </controller>
+ <controller type='pci' index='7' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='7' port='0x15'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
</controller>
<interface type='user'>
<mac address='52:54:00:9a:e6:c6'/>
<model type='virtio'/>
- <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
@@ -121,7 +125,7 @@
<address type='usb' bus='0' port='3'/>
</redirdev>
<memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</memballoon>
</devices>
</domain>
diff --git a/tests/qemuxml2xmloutdata/tseg-explicit-size.x86_64-latest.xml b/tests/qemuxml2xmloutdata/tseg-explicit-size.x86_64-latest.xml
index 78ffe820cf..6339300694 100644
--- a/tests/qemuxml2xmloutdata/tseg-explicit-size.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/tseg-explicit-size.x86_64-latest.xml
@@ -23,7 +23,7 @@
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<controller type='usb' index='0' model='qemu-xhci'>
- <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
@@ -34,21 +34,25 @@
<target chassis='1' port='0x8'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
</controller>
- <controller type='pci' index='2' model='pcie-root-port'>
- <model name='pcie-root-port'/>
- <target chassis='2' port='0x9'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='3' port='0xa'/>
+ <target chassis='3' port='0x9'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ </controller>
+ <controller type='pci' index='4' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='4' port='0xa'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
<memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</memballoon>
</devices>
</domain>
diff --git a/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml b/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml
index ad3a702b0b..e116aa9603 100644
--- a/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/virtio-iommu-x86_64.x86_64-latest.xml
@@ -25,12 +25,21 @@
<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='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='1' port='0x8'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ </controller>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
<memballoon model='none'/>
<iommu model='virtio'>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</iommu>
</devices>
</domain>
diff --git a/tests/qemuxml2xmloutdata/virtio-non-transitional.x86_64-latest.xml b/tests/qemuxml2xmloutdata/virtio-non-transitional.x86_64-latest.xml
index 26f6c6d34e..a6f8662f5b 100644
--- a/tests/qemuxml2xmloutdata/virtio-non-transitional.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/virtio-non-transitional.x86_64-latest.xml
@@ -21,13 +21,13 @@
<driver name='qemu' type='raw'/>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='vda' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</disk>
<controller type='virtio-serial' index='0' model='virtio-non-transitional'>
- <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</controller>
<controller type='scsi' index='0' model='virtio-non-transitional'>
- <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</controller>
<controller type='usb' index='0' model='none'/>
<controller type='sata' index='0'>
@@ -39,78 +39,82 @@
<target chassis='1' port='0x8'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
</controller>
- <controller type='pci' index='2' model='pcie-root-port'>
- <model name='pcie-root-port'/>
- <target chassis='2' port='0x9'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='3' port='0xa'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ <target chassis='3' port='0x9'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='pci' index='4' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='4' port='0xb'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
+ <target chassis='4' port='0xa'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='5' port='0xc'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
+ <target chassis='5' port='0xb'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
</controller>
<controller type='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='6' port='0xd'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
+ <target chassis='6' port='0xc'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
</controller>
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='7' port='0xe'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
+ <target chassis='7' port='0xd'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
</controller>
<controller type='pci' index='8' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='8' port='0xf'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>
+ <target chassis='8' port='0xe'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
</controller>
<controller type='pci' index='9' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='9' port='0x10'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
+ <target chassis='9' port='0xf'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>
</controller>
<controller type='pci' index='10' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='10' port='0x11'/>
+ <target chassis='10' port='0x10'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
+ </controller>
+ <controller type='pci' index='11' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='11' port='0x11'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
</controller>
<filesystem type='mount' accessmode='passthrough' model='virtio-non-transitional'>
<source dir='/export/fs1'/>
<target dir='fs1'/>
- <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</filesystem>
<interface type='user'>
<mac address='00:11:22:33:44:55'/>
<model type='virtio-non-transitional'/>
- <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</interface>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
<hostdev mode='subsystem' type='scsi_host' managed='no' model='virtio-non-transitional'>
<source protocol='vhost' wwpn='naa.5123456789abcde0'/>
- <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
</hostdev>
<memballoon model='virtio-non-transitional'>
- <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
</memballoon>
<rng model='virtio-non-transitional'>
<backend model='random'>/dev/urandom</backend>
- <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
</rng>
<vsock model='virtio-non-transitional'>
<cid auto='no' address='4'/>
- <address type='pci' domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
</vsock>
</devices>
</domain>
diff --git a/tests/qemuxml2xmloutdata/virtio-transitional.x86_64-latest.xml b/tests/qemuxml2xmloutdata/virtio-transitional.x86_64-latest.xml
index 8e9ecd8cf3..e920147f16 100644
--- a/tests/qemuxml2xmloutdata/virtio-transitional.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/virtio-transitional.x86_64-latest.xml
@@ -37,17 +37,12 @@
<controller type='pci' index='1' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='1' port='0x8'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</controller>
<controller type='pci' index='2' model='pcie-to-pci-bridge'>
<model name='pcie-pci-bridge'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
- <controller type='pci' index='3' model='pcie-root-port'>
- <model name='pcie-root-port'/>
- <target chassis='3' port='0x9'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
- </controller>
<filesystem type='mount' accessmode='passthrough' model='virtio-transitional'>
<source dir='/export/fs1'/>
<target dir='fs1'/>
diff --git a/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml b/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml
index 61b9077597..d014ecdc14 100644
--- a/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/x86_64-default-cpu-kvm-q35-4.2.x86_64-latest.xml
@@ -25,10 +25,10 @@
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/guest.qcow2'/>
<target dev='vda' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci'>
- <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
@@ -39,26 +39,30 @@
<target chassis='1' port='0x8'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
</controller>
- <controller type='pci' index='2' model='pcie-root-port'>
- <model name='pcie-root-port'/>
- <target chassis='2' port='0x9'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='3' port='0xa'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ <target chassis='3' port='0x9'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='pci' index='4' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='4' port='0xb'/>
+ <target chassis='4' port='0xa'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='5' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='5' port='0xb'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
</controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
<memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</memballoon>
</devices>
</domain>
diff --git a/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml b/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml
index 04335f6244..e1ea284491 100644
--- a/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/x86_64-default-cpu-tcg-q35-4.2.x86_64-latest.xml
@@ -25,10 +25,10 @@
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/guest.qcow2'/>
<target dev='vda' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci'>
- <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
@@ -39,26 +39,30 @@
<target chassis='1' port='0x8'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
</controller>
- <controller type='pci' index='2' model='pcie-root-port'>
- <model name='pcie-root-port'/>
- <target chassis='2' port='0x9'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='3' port='0xa'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ <target chassis='3' port='0x9'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='pci' index='4' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='4' port='0xb'/>
+ <target chassis='4' port='0xa'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='5' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='5' port='0xb'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
</controller>
<input type='mouse' bus='ps2'/>
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
<memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</memballoon>
</devices>
</domain>
diff --git a/tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml b/tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml
index 02485adb98..589e1f01f9 100644
--- a/tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/x86_64-q35-graphics.x86_64-latest.xml
@@ -38,57 +38,61 @@
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/guest.qcow2'/>
<target dev='vda' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci' ports='15'>
- <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pcie-root'/>
- <controller type='virtio-serial' index='0'>
- <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
- </controller>
<controller type='pci' index='1' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='1' port='0x10'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
</controller>
- <controller type='pci' index='2' model='pcie-root-port'>
- <model name='pcie-root-port'/>
- <target chassis='2' port='0x11'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='virtio-serial' index='0'>
+ <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='3' port='0x12'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
+ <target chassis='3' port='0x11'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
</controller>
<controller type='pci' index='4' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='4' port='0x13'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
+ <target chassis='4' port='0x12'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='5' port='0x14'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
+ <target chassis='5' port='0x13'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
</controller>
<controller type='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='6' port='0x15'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
+ <target chassis='6' port='0x14'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
</controller>
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='7' port='0x16'/>
+ <target chassis='7' port='0x15'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
+ </controller>
+ <controller type='pci' index='8' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='8' port='0x16'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
</controller>
<interface type='user'>
<mac address='52:54:00:d2:70:0b'/>
<model type='virtio'/>
- <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
@@ -114,11 +118,11 @@
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</video>
<memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</memballoon>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
- <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
</rng>
</devices>
</domain>
diff --git a/tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml b/tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml
index 0eedb748dd..8f7eec34f3 100644
--- a/tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/x86_64-q35-headless.x86_64-latest.xml
@@ -38,57 +38,61 @@
<driver name='qemu' type='qcow2'/>
<source file='/var/lib/libvirt/images/guest.qcow2'/>
<target dev='vda' bus='virtio'/>
- <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci' ports='15'>
- <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</controller>
<controller type='sata' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
</controller>
<controller type='pci' index='0' model='pcie-root'/>
- <controller type='virtio-serial' index='0'>
- <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
- </controller>
<controller type='pci' index='1' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='1' port='0x8'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
</controller>
- <controller type='pci' index='2' model='pcie-root-port'>
- <model name='pcie-root-port'/>
- <target chassis='2' port='0x9'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+ <controller type='pci' index='2' model='pcie-to-pci-bridge'>
+ <model name='pcie-pci-bridge'/>
+ <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ </controller>
+ <controller type='virtio-serial' index='0'>
+ <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='3' port='0xa'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ <target chassis='3' port='0x9'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
</controller>
<controller type='pci' index='4' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='4' port='0xb'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
+ <target chassis='4' port='0xa'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='5' port='0xc'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
+ <target chassis='5' port='0xb'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
</controller>
<controller type='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='6' port='0xd'/>
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
+ <target chassis='6' port='0xc'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
</controller>
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
- <target chassis='7' port='0xe'/>
+ <target chassis='7' port='0xd'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
+ </controller>
+ <controller type='pci' index='8' model='pcie-root-port'>
+ <model name='pcie-root-port'/>
+ <target chassis='8' port='0xe'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
</controller>
<interface type='user'>
<mac address='52:54:00:09:a4:37'/>
<model type='virtio'/>
- <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</interface>
<serial type='pty'>
<target type='isa-serial' port='0'>
@@ -106,11 +110,11 @@
<input type='keyboard' bus='ps2'/>
<audio id='1' type='none'/>
<memballoon model='virtio'>
- <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
</memballoon>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
- <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
+ <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
</rng>
</devices>
</domain>
--
2.38.1
2 years
[PATCH] cpu_map: Add cpu feature amx
by Lin Yang
AMX was introduced in QEMU commit 1f16764f7d4515bfd5e4ae0aae814fa280a7d0c8
and following commits.
---
src/cpu_map/sync_qemu_i386.py | 3 +++
src/cpu_map/x86_features.xml | 9 +++++++++
2 files changed, 12 insertions(+)
diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py
index 4dd9f3b84d..6a46f87cff 100755
--- a/src/cpu_map/sync_qemu_i386.py
+++ b/src/cpu_map/sync_qemu_i386.py
@@ -72,6 +72,9 @@ def translate_feature(name):
"CPUID_7_0_EDX_SPEC_CTRL": "spec-ctrl",
"CPUID_7_0_EDX_SPEC_CTRL_SSBD": "ssbd",
"CPUID_7_0_EDX_STIBP": "stibp",
+ "CPUID_7_0_EDX_AMX_BF16": "amx-bf16",
+ "CPUID_7_0_EDX_AMX_TILE": "amx-tile",
+ "CPUID_7_0_EDX_AMX_INT8": "amx-int8",
"CPUID_7_1_EAX_AVX512_BF16": "avx512-bf16",
"CPUID_7_1_EAX_AVX_VNNI": "avx-vnni",
"CPUID_8000_0008_EBX_AMD_SSBD": "amd-ssbd",
diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml
index 4cf3ff0804..102d39f626 100644
--- a/src/cpu_map/x86_features.xml
+++ b/src/cpu_map/x86_features.xml
@@ -347,6 +347,15 @@
<feature name='pconfig'>
<cpuid eax_in='0x07' ecx_in='0x00' edx='0x00040000'/>
</feature>
+ <feature name='amx-bf16'>
+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x00400000'/>
+ </feature>
+ <feature name='amx-tile'>
+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x01000000'/>
+ </feature>
+ <feature name='amx-int8'>
+ <cpuid eax_in='0x07' ecx_in='0x00' edx='0x02000000'/>
+ </feature>
<feature name='spec-ctrl'>
<cpuid eax_in='0x07' ecx_in='0x00' edx='0x04000000'/>
</feature>
--
2.34.1
2 years
[PATCH] qemu: Drop NULL checks guarding g_slist_free_full()
by Michal Privoznik
The g_slist_free_full() function is perfectly capable of handling
NULL (in which case it's NOP), therefore there's no need to check
passed pointers for NULL. We have them though in couple of
places. Drop them.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain.c | 8 +++-----
src/qemu/qemu_migration_cookie.c | 10 ++++------
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index c3afc6c9d3..09e213e48d 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -103,9 +103,8 @@ qemuJobFreePrivate(void *opaque)
return;
qemuMigrationParamsFree(priv->migParams);
- if (priv->migTempBitmaps)
- g_slist_free_full(priv->migTempBitmaps,
- (GDestroyNotify) qemuDomainJobPrivateMigrateTempBitmapFree);
+ g_slist_free_full(priv->migTempBitmaps,
+ (GDestroyNotify) qemuDomainJobPrivateMigrateTempBitmapFree);
g_free(priv);
}
@@ -1733,8 +1732,7 @@ qemuDomainObjPrivateDataClear(qemuDomainObjPrivate *priv)
priv->dbusDaemonRunning = false;
- if (priv->dbusVMStateIds)
- g_slist_free_full(g_steal_pointer(&priv->dbusVMStateIds), g_free);
+ g_slist_free_full(g_steal_pointer(&priv->dbusVMStateIds), g_free);
priv->dbusVMState = false;
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index 95e803b3e1..4d070e438d 100644
--- a/src/qemu/qemu_migration_cookie.c
+++ b/src/qemu/qemu_migration_cookie.c
@@ -139,9 +139,8 @@ qemuMigrationBlockDirtyBitmapsDiskFree(qemuMigrationBlockDirtyBitmapsDisk *dsk)
return;
g_free(dsk->target);
- if (dsk->bitmaps)
- g_slist_free_full(dsk->bitmaps,
- (GDestroyNotify) qemuMigrationBlockDirtyBitmapsDiskBitmapFree);
+ g_slist_free_full(dsk->bitmaps,
+ (GDestroyNotify) qemuMigrationBlockDirtyBitmapsDiskBitmapFree);
g_free(dsk);
}
@@ -168,9 +167,8 @@ qemuMigrationCookieFree(qemuMigrationCookie *mig)
g_clear_pointer(&mig->jobData, virDomainJobDataFree);
virCPUDefFree(mig->cpu);
qemuMigrationCookieCapsFree(mig->caps);
- if (mig->blockDirtyBitmaps)
- g_slist_free_full(mig->blockDirtyBitmaps,
- (GDestroyNotify) qemuMigrationBlockDirtyBitmapsDiskFree);
+ g_slist_free_full(mig->blockDirtyBitmaps,
+ (GDestroyNotify) qemuMigrationBlockDirtyBitmapsDiskFree);
g_free(mig);
}
--
2.37.4
2 years