Internally format the PCI controller properties into JSON, but convert
it back to a string so that we for now change just the SCSI controller.

The change in tests is expected as the 'port' field for various PCI
controllers is expected to be a number and thus can't be represented as
a hexadecimal value in JSON.

QEMU expects the following types:

'pci-bridge'
  chassis_nr=<uint8>     -  (default: 0)

'pxb-pcie':
  bus_nr=<uint8>         -  (default: 0)

'pcie-root-port'
  port=<uint8>           -  (default: 0)
  chassis=<uint8>        -  (default: 0)
  hotplug=<bool>         -  (default: true)

Signed-off-by: Peter Krempa <pkre...@redhat.com>
---
 src/qemu/qemu_command.c                       | 99 +++++++++++++------
 ...fault-cpu-kvm-virt-4.2.aarch64-latest.args |  4 +-
 ...fault-cpu-tcg-virt-4.2.aarch64-latest.args |  4 +-
 .../qemuxml2argvdata/aarch64-pci-serial.args  |  2 +-
 .../aarch64-traditional-pci.args              |  4 +-
 .../aarch64-video-default.args                |  2 +-
 .../aarch64-video-virtio-gpu-pci.args         |  4 +-
 .../aarch64-virt-2.6-virtio-pci-default.args  |  2 +-
 .../aarch64-virt-graphics.aarch64-latest.args | 16 +--
 .../aarch64-virt-headless.aarch64-latest.args | 14 +--
 .../aarch64-virtio-pci-default.args           | 12 +--
 tests/qemuxml2argvdata/autoindex.args         | 22 ++---
 tests/qemuxml2argvdata/bios-nvram-secure.args |  2 +-
 tests/qemuxml2argvdata/cpu-host-model.args    |  2 +-
 .../cpu-host-model.x86_64-2.11.0.args         |  6 +-
 .../cpu-host-model.x86_64-2.12.0.args         |  6 +-
 .../cpu-host-model.x86_64-3.0.0.args          |  6 +-
 .../cpu-host-model.x86_64-3.1.0.args          |  6 +-
 .../cpu-host-model.x86_64-4.0.0.args          |  6 +-
 .../cpu-host-model.x86_64-4.1.0.args          |  6 +-
 .../cpu-host-model.x86_64-4.2.0.args          |  6 +-
 .../cpu-host-model.x86_64-5.0.0.args          |  6 +-
 .../cpu-host-model.x86_64-5.1.0.args          |  6 +-
 .../cpu-host-model.x86_64-5.2.0.args          |  6 +-
 .../cpu-host-model.x86_64-6.0.0.args          |  6 +-
 .../cpu-host-model.x86_64-6.1.0.args          |  6 +-
 .../cpu-host-model.x86_64-latest.args         |  6 +-
 ...ult-video-type-aarch64.aarch64-latest.args |  4 +-
 ...ult-video-type-riscv64.riscv64-latest.args |  4 +-
 .../disk-floppy-q35-2_11.x86_64-2.12.0.args   |  4 +-
 .../disk-floppy-q35-2_11.x86_64-latest.args   |  4 +-
 .../disk-floppy-q35-2_9.x86_64-2.12.0.args    |  4 +-
 .../disk-floppy-q35-2_9.x86_64-latest.args    |  4 +-
 .../hostdev-scsi-vhost-scsi-pcie.args         |  4 +-
 .../mach-virt-serial-pci.args                 |  2 +-
 .../mach-virt-serial-usb.args                 |  4 +-
 tests/qemuxml2argvdata/machine-smm-opt.args   |  2 +-
 .../os-firmware-bios.x86_64-latest.args       |  2 +-
 ...re-efi-no-enrolled-keys.x86_64-latest.args |  4 +-
 ...os-firmware-efi-secboot.x86_64-latest.args |  2 +-
 .../os-firmware-efi.x86_64-latest.args        |  2 +-
 tests/qemuxml2argvdata/pcie-expander-bus.args | 66 ++++++-------
 .../pcie-root-port-model-generic.args         |  6 +-
 .../pcie-root-port-model-ioh3420.args         |  4 +-
 ...cie-root-port-nohotplug.x86_64-latest.args | 14 +--
 tests/qemuxml2argvdata/pcie-root-port.args    |  4 +-
 .../pcie-switch-downstream-port.args          | 16 +--
 .../pcie-switch-upstream-port.args            |  4 +-
 .../q35-default-devices-only.args             |  6 +-
 tests/qemuxml2argvdata/q35-multifunction.args | 36 +++----
 .../q35-pci-force-address.args                |  2 +-
 tests/qemuxml2argvdata/q35-pcie-autoadd.args  | 28 +++---
 tests/qemuxml2argvdata/q35-pcie.args          | 26 ++---
 .../q35-pm-disable-fallback.args              |  2 +-
 tests/qemuxml2argvdata/q35-pm-disable.args    |  2 +-
 .../q35-virt-manager-basic.args               | 12 +--
 tests/qemuxml2argvdata/q35-virtio-pci.args    | 26 ++---
 .../riscv64-virt-graphics.riscv64-latest.args | 16 +--
 .../riscv64-virt-headless.riscv64-latest.args | 14 +--
 .../tseg-explicit-size.x86_64-latest.args     |  6 +-
 ...vhost-user-fs-hugepages.x86_64-latest.args |  8 +-
 .../virtio-non-transitional.x86_64-3.1.0.args | 22 ++---
 ...virtio-non-transitional.x86_64-latest.args | 22 ++---
 .../virtio-transitional.x86_64-3.1.0.args     |  4 +-
 .../virtio-transitional.x86_64-latest.args    |  4 +-
 ...default-cpu-kvm-q35-4.2.x86_64-latest.args |  8 +-
 ...default-cpu-tcg-q35-4.2.x86_64-latest.args |  8 +-
 .../x86_64-q35-graphics.x86_64-latest.args    | 14 +--
 .../x86_64-q35-headless.x86_64-latest.args    | 14 +--
 69 files changed, 372 insertions(+), 335 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 7e3e526fa5..68b6bf868e 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2939,15 +2939,15 @@ qemuBuildControllerSCSIDevProps(const virDomainDef 
*domainDef,


 static int
-qemuBuildControllerPCIDevStr(virDomainControllerDef *def,
-                             const virDomainDef *domainDef,
-                             char **devstr)
+qemuBuildControllerPCIDevProps(virDomainControllerDef *def,
+                               const virDomainDef *domainDef,
+                               virJSONValue **devprops)
 {
-    g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
+    g_autoptr(virJSONValue) props = NULL;
     const virDomainPCIControllerOpts *pciopts = &def->opts.pciopts;
     const char *modelName = 
virDomainControllerPCIModelNameTypeToString(pciopts->modelName);

-    *devstr = NULL;
+    *devprops = NULL;

     /* Skip the implicit PHB for pSeries guests */
     if (def->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT &&
@@ -2965,42 +2965,65 @@ qemuBuildControllerPCIDevStr(virDomainControllerDef 
*def,

     switch ((virDomainControllerModelPCI) def->model) {
     case VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE:
-        virBufferAsprintf(&buf, "%s,chassis_nr=%d,id=%s",
-                          modelName, pciopts->chassisNr,
-                          def->info.alias);
+        if (virJSONValueObjectCreate(&props,
+                                     "s:driver", modelName,
+                                     "i:chassis_nr", pciopts->chassisNr,
+                                     "s:id", def->info.alias,
+                                     NULL) < 0)
+            return -1;
+
         break;
+
     case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS:
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS:
-        virBufferAsprintf(&buf, "%s,bus_nr=%d,id=%s",
-                          modelName, pciopts->busNr,
-                          def->info.alias);
-        if (pciopts->numaNode != -1) {
-            virBufferAsprintf(&buf, ",numa_node=%d",
-                              pciopts->numaNode);
-        }
+        if (virJSONValueObjectCreate(&props,
+                                     "s:driver", modelName,
+                                     "i:bus_nr", pciopts->busNr,
+                                     "s:id", def->info.alias,
+                                     NULL) < 0)
+            return -1;
+
+        if (pciopts->numaNode != -1 &&
+            virJSONValueObjectAdd(props, "i:numa_node", pciopts->numaNode, 
NULL) < 0)
+            return -1;
+
         break;
+
     case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE:
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT:
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE:
-        virBufferAsprintf(&buf, "%s,id=%s", modelName, def->info.alias);
+        if (virJSONValueObjectCreate(&props,
+                                     "s:driver", modelName,
+                                     "s:id", def->info.alias,
+                                     NULL) < 0)
+            return -1;
+
         break;
+
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT:
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT:
-        virBufferAsprintf(&buf, "%s,port=0x%x,chassis=%d,id=%s",
-                          modelName, pciopts->port,
-                          pciopts->chassis, def->info.alias);
-        if (pciopts->hotplug != VIR_TRISTATE_SWITCH_ABSENT) {
-            virBufferAsprintf(&buf, ",hotplug=%s",
-                              virTristateSwitchTypeToString(pciopts->hotplug));
-        }
+        if (virJSONValueObjectCreate(&props,
+                                     "s:driver", modelName,
+                                     "i:port", pciopts->port,
+                                     "i:chassis", pciopts->chassis,
+                                     "s:id", def->info.alias,
+                                     "T:hotplug", pciopts->hotplug,
+                                     NULL) < 0)
+            return -1;
+
         break;
     case VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT:
-        virBufferAsprintf(&buf, "%s,index=%d,id=%s",
-                          modelName, pciopts->targetIndex,
-                          def->info.alias);
+        if (virJSONValueObjectCreate(&props,
+                                     "s:driver", modelName,
+                                     "i:index", pciopts->targetIndex,
+                                     "s:id", def->info.alias,
+                                     NULL) < 0)
+            return -1;
+
+        if (pciopts->numaNode != -1 &&
+            virJSONValueObjectAdd(props, "i:numa_node", pciopts->numaNode, 
NULL) < 0)
+            return -1;

-        if (pciopts->numaNode != -1)
-            virBufferAsprintf(&buf, ",numa_node=%d", pciopts->numaNode);
         break;
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT:
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
@@ -3014,10 +3037,10 @@ qemuBuildControllerPCIDevStr(virDomainControllerDef 
*def,
         return -1;
     }

-    if (qemuBuildDeviceAddressStr(&buf, domainDef, &def->info) < 0)
+    if (qemuBuildDeviceAddressProps(props, domainDef, &def->info) < 0)
         return -1;

-    *devstr = virBufferContentAndReset(&buf);
+    *devprops = g_steal_pointer(&props);
     return 0;
 }

@@ -3102,7 +3125,21 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
         break;

     case VIR_DOMAIN_CONTROLLER_TYPE_PCI:
-        return qemuBuildControllerPCIDevStr(def, domainDef, devstr);
+        if (qemuBuildControllerPCIDevProps(def, domainDef, &props) < 0)
+            return -1;
+
+        if (!props)
+            return 0;
+
+        driver = virJSONValueObjectGetString(props, "driver");
+
+        virBufferAsprintf(&buf, "%s,", driver);
+
+        if (virQEMUBuildCommandLineJSON(props, &buf, "driver", NULL) < 0)
+            return -1;
+
+        *devstr = virBufferContentAndReset(&buf);
+        return 0;

     case VIR_DOMAIN_CONTROLLER_TYPE_IDE:
     case VIR_DOMAIN_CONTROLLER_TYPE_FDC:
diff --git 
a/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args 
b/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args
index b2285a5e1d..9a702f6a16 100644
--- 
a/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args
+++ 
b/tests/qemuxml2argvdata/aarch64-default-cpu-kvm-virt-4.2.aarch64-latest.args
@@ -25,8 +25,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-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 \
 -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 
virtio-blk-pci,bus=pci.1,addr=0x0,drive=libvirt-1-format,id=virtio-disk0,bootindex=1
 \
diff --git 
a/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args 
b/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args
index d4b63539a3..7647de0342 100644
--- 
a/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args
+++ 
b/tests/qemuxml2argvdata/aarch64-default-cpu-tcg-virt-4.2.aarch64-latest.args
@@ -26,8 +26,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-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 \
 -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 
virtio-blk-pci,bus=pci.1,addr=0x0,drive=libvirt-1-format,id=virtio-disk0,bootindex=1
 \
diff --git a/tests/qemuxml2argvdata/aarch64-pci-serial.args 
b/tests/qemuxml2argvdata/aarch64-pci-serial.args
index 92f6c00556..7be4bf60e3 100644
--- a/tests/qemuxml2argvdata/aarch64-pci-serial.args
+++ b/tests/qemuxml2argvdata/aarch64-pci-serial.args
@@ -27,7 +27,7 @@ QEMU_AUDIO_DRV=none \
 -boot strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device pcie-root-port,port=0x10,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
+-device pcie-root-port,port=16,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
 -chardev pty,id=charserial0,logfile=/tmp/log,logappend=on \
 -device pci-serial,chardev=charserial0,id=serial0,bus=pci.2,addr=0x1 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/aarch64-traditional-pci.args 
b/tests/qemuxml2argvdata/aarch64-traditional-pci.args
index d2779f0528..0da111db80 100644
--- a/tests/qemuxml2argvdata/aarch64-traditional-pci.args
+++ b/tests/qemuxml2argvdata/aarch64-traditional-pci.args
@@ -25,9 +25,9 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
+-device 
pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
 -device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
--device pcie-root-port,port=0x9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
+-device pcie-root-port,port=9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
 -chardev pty,id=charserial0 \
 -device pci-serial,chardev=charserial0,id=serial0,bus=pci.2,addr=0x1 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/aarch64-video-default.args 
b/tests/qemuxml2argvdata/aarch64-video-default.args
index 568b456389..ea9449df34 100644
--- a/tests/qemuxml2argvdata/aarch64-video-default.args
+++ b/tests/qemuxml2argvdata/aarch64-video-default.args
@@ -27,7 +27,7 @@ QEMU_AUDIO_DRV=none \
 -boot strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
+-device ioh3420,port=16,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
 -vnc 127.0.0.1:0 \
 -device virtio-gpu-pci,id=video0,bus=pci.2,addr=0x1 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args 
b/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args
index ce3b68bf18..fd1d69cf65 100644
--- a/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args
+++ b/tests/qemuxml2argvdata/aarch64-video-virtio-gpu-pci.args
@@ -26,8 +26,8 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
ioh3420,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device 
ioh3420,port=0x9,chassis=2,id=pci.2,bus=pcie.0,multifunction=on,addr=0x1.0x1 \
+-device ioh3420,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
+-device 
ioh3420,port=9,chassis=2,id=pci.2,bus=pcie.0,multifunction=on,addr=0x1.0x1 \
 -netdev user,id=hostnet0 \
 -device 
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:73:34:53,bootindex=1,bus=pci.1,addr=0x0
 \
 -device virtio-gpu-pci,id=video0,bus=pci.2,addr=0x0 \
diff --git a/tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.args 
b/tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.args
index 0f898010f8..185303200c 100644
--- a/tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.args
+++ b/tests/qemuxml2argvdata/aarch64-virt-2.6-virtio-pci-default.args
@@ -32,7 +32,7 @@ QEMU_AUDIO_DRV=none \
 -dtb /aarch64.dtb \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
+-device ioh3420,port=16,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
 -device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x2 \
 -drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \
 -device 
virtio-blk-pci,bus=pci.2,addr=0x3,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
 \
diff --git a/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args 
b/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args
index 5f98b32dad..878deacf76 100644
--- a/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args
+++ b/tests/qemuxml2argvdata/aarch64-virt-graphics.aarch64-latest.args
@@ -28,14 +28,14 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
--device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
--device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
--device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
--device pcie-root-port,port=0xf,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \
+-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 pcie-root-port,port=11,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-device pcie-root-port,port=12,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
+-device pcie-root-port,port=13,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
+-device pcie-root-port,port=14,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
+-device pcie-root-port,port=15,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \
 -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \
 -device virtio-serial-pci,id=virtio-serial0,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"}'
 \
diff --git a/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args 
b/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args
index e4ee704275..71838bc407 100644
--- a/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args
+++ b/tests/qemuxml2argvdata/aarch64-virt-headless.aarch64-latest.args
@@ -29,13 +29,13 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
--device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
--device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
--device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
+-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 pcie-root-port,port=11,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-device pcie-root-port,port=12,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
+-device pcie-root-port,port=13,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
+-device pcie-root-port,port=14,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
 -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \
 -device virtio-serial-pci,id=virtio-serial0,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"}'
 \
diff --git a/tests/qemuxml2argvdata/aarch64-virtio-pci-default.args 
b/tests/qemuxml2argvdata/aarch64-virtio-pci-default.args
index 426881a10d..15c64312e3 100644
--- a/tests/qemuxml2argvdata/aarch64-virtio-pci-default.args
+++ b/tests/qemuxml2argvdata/aarch64-virtio-pci-default.args
@@ -30,12 +30,12 @@ QEMU_AUDIO_DRV=none \
 -initrd /aarch64.initrd \
 -append 'earlyprintk console=ttyAMA0,115200n8 rw root=/dev/vda rootwait' \
 -dtb /aarch64.dtb \
--device 
ioh3420,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device ioh3420,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device ioh3420,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device ioh3420,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
--device ioh3420,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
--device ioh3420,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
+-device ioh3420,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
+-device ioh3420,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-device ioh3420,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-device ioh3420,port=11,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-device ioh3420,port=12,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
+-device ioh3420,port=13,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
 -device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x0 \
 -drive file=/aarch64.raw,format=raw,if=none,id=drive-virtio-disk0 \
 -device 
virtio-blk-pci,bus=pci.3,addr=0x0,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1
 \
diff --git a/tests/qemuxml2argvdata/autoindex.args 
b/tests/qemuxml2argvdata/autoindex.args
index 2a6233a1ed..50e9ef0fe9 100644
--- a/tests/qemuxml2argvdata/autoindex.args
+++ b/tests/qemuxml2argvdata/autoindex.args
@@ -27,18 +27,18 @@ QEMU_AUDIO_DRV=none \
 -boot strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
+-device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
 -device x3130-upstream,id=pci.4,bus=pci.3,addr=0x0 \
--device xio3130-downstream,port=0x0,chassis=5,id=pci.5,bus=pci.4,addr=0x0 \
--device xio3130-downstream,port=0x1,chassis=6,id=pci.6,bus=pci.4,addr=0x1 \
--device xio3130-downstream,port=0x2,chassis=7,id=pci.7,bus=pci.4,addr=0x2 \
--device xio3130-downstream,port=0x3,chassis=8,id=pci.8,bus=pci.4,addr=0x3 \
--device xio3130-downstream,port=0x4,chassis=9,id=pci.9,bus=pci.4,addr=0x4 \
--device xio3130-downstream,port=0x5,chassis=10,id=pci.10,bus=pci.4,addr=0x5 \
--device xio3130-downstream,port=0x6,chassis=11,id=pci.11,bus=pci.4,addr=0x6 \
--device xio3130-downstream,port=0x7,chassis=12,id=pci.12,bus=pci.4,addr=0x7 \
--device xio3130-downstream,port=0x8,chassis=13,id=pci.13,bus=pci.4,addr=0x8 \
--device xio3130-downstream,port=0x9,chassis=14,id=pci.14,bus=pci.4,addr=0x9 \
+-device xio3130-downstream,port=0,chassis=5,id=pci.5,bus=pci.4,addr=0x0 \
+-device xio3130-downstream,port=1,chassis=6,id=pci.6,bus=pci.4,addr=0x1 \
+-device xio3130-downstream,port=2,chassis=7,id=pci.7,bus=pci.4,addr=0x2 \
+-device xio3130-downstream,port=3,chassis=8,id=pci.8,bus=pci.4,addr=0x3 \
+-device xio3130-downstream,port=4,chassis=9,id=pci.9,bus=pci.4,addr=0x4 \
+-device xio3130-downstream,port=5,chassis=10,id=pci.10,bus=pci.4,addr=0x5 \
+-device xio3130-downstream,port=6,chassis=11,id=pci.11,bus=pci.4,addr=0x6 \
+-device xio3130-downstream,port=7,chassis=12,id=pci.12,bus=pci.4,addr=0x7 \
+-device xio3130-downstream,port=8,chassis=13,id=pci.13,bus=pci.4,addr=0x8 \
+-device xio3130-downstream,port=9,chassis=14,id=pci.14,bus=pci.4,addr=0x9 \
 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 \
 -device 
ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d
 \
 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 \
diff --git a/tests/qemuxml2argvdata/bios-nvram-secure.args 
b/tests/qemuxml2argvdata/bios-nvram-secure.args
index 7b9a958536..0bf2cbbe34 100644
--- a/tests/qemuxml2argvdata/bios-nvram-secure.args
+++ b/tests/qemuxml2argvdata/bios-nvram-secure.args
@@ -29,7 +29,7 @@ QEMU_AUDIO_DRV=none \
 -boot menu=on,strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
+-device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
 -device virtio-scsi-pci,id=scsi0,bus=pci.2,addr=0x1 \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-scsi0-0-0-0 \
 -device 
scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1
 \
diff --git a/tests/qemuxml2argvdata/cpu-host-model.args 
b/tests/qemuxml2argvdata/cpu-host-model.args
index 96fe2f9edb..8096929399 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.args
@@ -28,7 +28,7 @@ QEMU_AUDIO_DRV=none \
 -boot strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
+-device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 \
 -device 
ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d
 \
 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 \
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.11.0.args 
b/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.11.0.args
index bd3a9e26d2..ba89e4cce3 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.11.0.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.11.0.args
@@ -26,9 +26,9 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
 -sandbox 
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.12.0.args 
b/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.12.0.args
index 6bf18db474..55d5f5652a 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.12.0.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-2.12.0.args
@@ -26,9 +26,9 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
 -sandbox 
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.0.0.args 
b/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.0.0.args
index cb378765b0..4002974a95 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.0.0.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.0.0.args
@@ -26,9 +26,9 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
 -sandbox 
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.1.0.args 
b/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.1.0.args
index 9af5a7fffa..ba95587e8b 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.1.0.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-3.1.0.args
@@ -26,9 +26,9 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
 -sandbox 
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.0.0.args 
b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.0.0.args
index 28af7263a2..eee0be673d 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.0.0.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.0.0.args
@@ -26,9 +26,9 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
 -sandbox 
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.1.0.args 
b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.1.0.args
index b6a9afb359..bda5f557d9 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.1.0.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-4.1.0.args
@@ -26,9 +26,9 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
 -sandbox 
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
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 69dc442bfc..59f22d1e54 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
@@ -25,9 +25,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 \
 -audiodev id=audio1,driver=none \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
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 3ce594ba13..0c6ec3fe64 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
@@ -25,9 +25,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 \
 -audiodev id=audio1,driver=none \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
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 6c6ebb03f6..dfc31cd4c2 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
@@ -25,9 +25,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 \
 -audiodev id=audio1,driver=none \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
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 c943457ced..c9aab8533f 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
@@ -26,9 +26,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 \
 -audiodev id=audio1,driver=none \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
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 702cd70bd8..dd8182c8de 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
@@ -26,9 +26,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 \
 -audiodev id=audio1,driver=none \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
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 fee116de1e..d43200523c 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
@@ -26,9 +26,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 \
 -audiodev id=audio1,driver=none \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
diff --git a/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args 
b/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args
index c9eb5a42ab..ee31f01bf7 100644
--- a/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/cpu-host-model.x86_64-latest.args
@@ -26,9 +26,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 \
 -audiodev id=audio1,driver=none \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
diff --git 
a/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args 
b/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args
index 02986bb0df..5b7f77e348 100644
--- a/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args
+++ b/tests/qemuxml2argvdata/default-video-type-aarch64.aarch64-latest.args
@@ -24,8 +24,8 @@ 
XDG_CONFIG_HOME=/tmp/lib/domain--1-default-video-type-a/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-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 \
 -audiodev id=audio1,driver=none \
 -vnc 127.0.0.1:0,audiodev=audio1 \
 -device virtio-gpu-pci,id=video0,max_outputs=1,bus=pci.1,addr=0x0 \
diff --git 
a/tests/qemuxml2argvdata/default-video-type-riscv64.riscv64-latest.args 
b/tests/qemuxml2argvdata/default-video-type-riscv64.riscv64-latest.args
index 885de6d3a8..f2d54056d7 100644
--- a/tests/qemuxml2argvdata/default-video-type-riscv64.riscv64-latest.args
+++ b/tests/qemuxml2argvdata/default-video-type-riscv64.riscv64-latest.args
@@ -22,8 +22,8 @@ 
XDG_CONFIG_HOME=/tmp/lib/domain--1-default-video-type-r/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-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 \
 -audiodev id=audio1,driver=spice \
 -spice port=0,seamless-migration=on \
 -device virtio-gpu-pci,id=video0,max_outputs=1,bus=pci.1,addr=0x0 \
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-2.12.0.args 
b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-2.12.0.args
index 4db6287eaf..bd5b79e294 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-2.12.0.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-2.12.0.args
@@ -25,8 +25,8 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-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 qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
 -drive file=/tmp/firmware.img,format=raw,if=none,id=drive-fdc0-0-0 \
 -drive file=/tmp/data.img,format=qcow2,if=none,id=drive-fdc0-0-1 \
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args 
b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
index 5000112cdc..ca01a34f58 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_11.x86_64-latest.args
@@ -26,8 +26,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-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 qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
 -device isa-fdc,bootindexA=1 \
 -blockdev 
'{"driver":"file","filename":"/tmp/firmware.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}'
 \
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-2.12.0.args 
b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-2.12.0.args
index 67aeb49697..d489581cf8 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-2.12.0.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-2.12.0.args
@@ -25,8 +25,8 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-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 qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
 -drive file=/tmp/firmware.img,format=raw,if=none,id=drive-fdc0-0-0 \
 -drive file=/tmp/data.img,format=qcow2,if=none,id=drive-fdc0-0-1 \
diff --git a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args 
b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
index 76b481243f..1bb3851b2a 100644
--- a/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/disk-floppy-q35-2_9.x86_64-latest.args
@@ -26,8 +26,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-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 qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
 -device isa-fdc,bootindexA=1 \
 -blockdev 
'{"driver":"file","filename":"/tmp/firmware.img","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}'
 \
diff --git a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.args 
b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.args
index e1b1a385ae..a5d2246278 100644
--- a/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.args
+++ b/tests/qemuxml2argvdata/hostdev-scsi-vhost-scsi-pcie.args
@@ -25,7 +25,7 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-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 
vhost-scsi-pci,wwpn=naa.5123456789abcde0,vhostfd=3,id=hostdev0,bus=pci.1,addr=0x0
 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/mach-virt-serial-pci.args 
b/tests/qemuxml2argvdata/mach-virt-serial-pci.args
index c7b12375b0..fe9e938932 100644
--- a/tests/qemuxml2argvdata/mach-virt-serial-pci.args
+++ b/tests/qemuxml2argvdata/mach-virt-serial-pci.args
@@ -27,7 +27,7 @@ QEMU_AUDIO_DRV=none \
 -boot strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device pcie-root-port,port=0x10,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
+-device pcie-root-port,port=16,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
 -chardev pty,id=charserial0 \
 -device pci-serial,chardev=charserial0,id=serial0,bus=pci.2,addr=0x1 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/mach-virt-serial-usb.args 
b/tests/qemuxml2argvdata/mach-virt-serial-usb.args
index 77490c1427..13bba0a790 100644
--- a/tests/qemuxml2argvdata/mach-virt-serial-usb.args
+++ b/tests/qemuxml2argvdata/mach-virt-serial-usb.args
@@ -25,8 +25,8 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-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 qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
 -chardev pty,id=charserial0 \
 -device usb-serial,chardev=charserial0,id=serial0,bus=usb.0,port=1 \
diff --git a/tests/qemuxml2argvdata/machine-smm-opt.args 
b/tests/qemuxml2argvdata/machine-smm-opt.args
index eda178beb4..669d3b3a6e 100644
--- a/tests/qemuxml2argvdata/machine-smm-opt.args
+++ b/tests/qemuxml2argvdata/machine-smm-opt.args
@@ -27,7 +27,7 @@ QEMU_AUDIO_DRV=none \
 -boot strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
+-device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
 -device virtio-scsi-pci,id=scsi0,bus=pci.2,addr=0x1 \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-scsi0-0-0-0 \
 -device 
scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1
 \
diff --git a/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args 
b/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args
index 957249dc42..12f4e8fcb9 100644
--- a/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/os-firmware-bios.x86_64-latest.args
@@ -30,7 +30,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
 -boot menu=on,strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
+-device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 \
 -device 
ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d
 \
 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 \
diff --git 
a/tests/qemuxml2argvdata/os-firmware-efi-no-enrolled-keys.x86_64-latest.args 
b/tests/qemuxml2argvdata/os-firmware-efi-no-enrolled-keys.x86_64-latest.args
index 99b1d45176..5669c4c12a 100644
--- a/tests/qemuxml2argvdata/os-firmware-efi-no-enrolled-keys.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/os-firmware-efi-no-enrolled-keys.x86_64-latest.args
@@ -29,8 +29,8 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-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 qemu-xhci,id=usb,bus=pci.1,addr=0x0 \
 -audiodev id=audio1,driver=none \
 -sandbox 
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args 
b/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
index 256377ace0..b0dc79088a 100644
--- a/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/os-firmware-efi-secboot.x86_64-latest.args
@@ -34,7 +34,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
 -boot menu=on,strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
+-device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 \
 -device 
ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d
 \
 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 \
diff --git a/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args 
b/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
index d7807758d3..99dcc39d0f 100644
--- a/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/os-firmware-efi.x86_64-latest.args
@@ -33,7 +33,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-fedora/.config \
 -boot menu=on,strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
+-device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 \
 -device 
ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d
 \
 -device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1 \
diff --git a/tests/qemuxml2argvdata/pcie-expander-bus.args 
b/tests/qemuxml2argvdata/pcie-expander-bus.args
index 9cd3d93f3c..f040735d4c 100644
--- a/tests/qemuxml2argvdata/pcie-expander-bus.args
+++ b/tests/qemuxml2argvdata/pcie-expander-bus.args
@@ -28,40 +28,40 @@ QEMU_AUDIO_DRV=none \
 -no-acpi \
 -boot strict=on \
 -device pxb-pcie,bus_nr=254,id=pci.1,numa_node=0,bus=pcie.0,addr=0x4 \
--device ioh3420,port=0x0,chassis=2,id=pci.2,bus=pci.1,addr=0x0 \
+-device ioh3420,port=0,chassis=2,id=pci.2,bus=pci.1,addr=0x0 \
 -device x3130-upstream,id=pci.3,bus=pci.2,addr=0x0 \
--device xio3130-downstream,port=0x0,chassis=4,id=pci.4,bus=pci.3,addr=0x0 \
--device xio3130-downstream,port=0x1,chassis=5,id=pci.5,bus=pci.3,addr=0x1 \
--device xio3130-downstream,port=0x2,chassis=6,id=pci.6,bus=pci.3,addr=0x2 \
--device xio3130-downstream,port=0x3,chassis=7,id=pci.7,bus=pci.3,addr=0x3 \
--device xio3130-downstream,port=0x4,chassis=8,id=pci.8,bus=pci.3,addr=0x4 \
--device xio3130-downstream,port=0x5,chassis=9,id=pci.9,bus=pci.3,addr=0x5 \
--device xio3130-downstream,port=0x6,chassis=10,id=pci.10,bus=pci.3,addr=0x6 \
--device xio3130-downstream,port=0x7,chassis=11,id=pci.11,bus=pci.3,addr=0x7 \
--device xio3130-downstream,port=0x8,chassis=12,id=pci.12,bus=pci.3,addr=0x8 \
--device xio3130-downstream,port=0x9,chassis=13,id=pci.13,bus=pci.3,addr=0x9 \
--device xio3130-downstream,port=0xa,chassis=14,id=pci.14,bus=pci.3,addr=0xa \
--device xio3130-downstream,port=0xb,chassis=15,id=pci.15,bus=pci.3,addr=0xb \
--device xio3130-downstream,port=0xc,chassis=16,id=pci.16,bus=pci.3,addr=0xc \
--device xio3130-downstream,port=0xd,chassis=17,id=pci.17,bus=pci.3,addr=0xd \
--device xio3130-downstream,port=0xe,chassis=18,id=pci.18,bus=pci.3,addr=0xe \
--device xio3130-downstream,port=0xf,chassis=19,id=pci.19,bus=pci.3,addr=0xf \
--device xio3130-downstream,port=0x10,chassis=20,id=pci.20,bus=pci.3,addr=0x10 \
--device xio3130-downstream,port=0x11,chassis=21,id=pci.21,bus=pci.3,addr=0x11 \
--device xio3130-downstream,port=0x12,chassis=22,id=pci.22,bus=pci.3,addr=0x12 \
--device xio3130-downstream,port=0x13,chassis=23,id=pci.23,bus=pci.3,addr=0x13 \
--device xio3130-downstream,port=0x14,chassis=24,id=pci.24,bus=pci.3,addr=0x14 \
--device xio3130-downstream,port=0x15,chassis=25,id=pci.25,bus=pci.3,addr=0x15 \
--device xio3130-downstream,port=0x16,chassis=26,id=pci.26,bus=pci.3,addr=0x16 \
--device xio3130-downstream,port=0x17,chassis=27,id=pci.27,bus=pci.3,addr=0x17 \
--device xio3130-downstream,port=0x18,chassis=28,id=pci.28,bus=pci.3,addr=0x18 \
--device xio3130-downstream,port=0x19,chassis=29,id=pci.29,bus=pci.3,addr=0x19 \
--device xio3130-downstream,port=0x1a,chassis=30,id=pci.30,bus=pci.3,addr=0x1a \
--device xio3130-downstream,port=0x1b,chassis=31,id=pci.31,bus=pci.3,addr=0x1b \
--device xio3130-downstream,port=0x1c,chassis=32,id=pci.32,bus=pci.3,addr=0x1c \
--device xio3130-downstream,port=0x1d,chassis=33,id=pci.33,bus=pci.3,addr=0x1d \
--device xio3130-downstream,port=0x1e,chassis=34,id=pci.34,bus=pci.3,addr=0x1e \
--device xio3130-downstream,port=0x1f,chassis=35,id=pci.35,bus=pci.3,addr=0x1f \
+-device xio3130-downstream,port=0,chassis=4,id=pci.4,bus=pci.3,addr=0x0 \
+-device xio3130-downstream,port=1,chassis=5,id=pci.5,bus=pci.3,addr=0x1 \
+-device xio3130-downstream,port=2,chassis=6,id=pci.6,bus=pci.3,addr=0x2 \
+-device xio3130-downstream,port=3,chassis=7,id=pci.7,bus=pci.3,addr=0x3 \
+-device xio3130-downstream,port=4,chassis=8,id=pci.8,bus=pci.3,addr=0x4 \
+-device xio3130-downstream,port=5,chassis=9,id=pci.9,bus=pci.3,addr=0x5 \
+-device xio3130-downstream,port=6,chassis=10,id=pci.10,bus=pci.3,addr=0x6 \
+-device xio3130-downstream,port=7,chassis=11,id=pci.11,bus=pci.3,addr=0x7 \
+-device xio3130-downstream,port=8,chassis=12,id=pci.12,bus=pci.3,addr=0x8 \
+-device xio3130-downstream,port=9,chassis=13,id=pci.13,bus=pci.3,addr=0x9 \
+-device xio3130-downstream,port=10,chassis=14,id=pci.14,bus=pci.3,addr=0xa \
+-device xio3130-downstream,port=11,chassis=15,id=pci.15,bus=pci.3,addr=0xb \
+-device xio3130-downstream,port=12,chassis=16,id=pci.16,bus=pci.3,addr=0xc \
+-device xio3130-downstream,port=13,chassis=17,id=pci.17,bus=pci.3,addr=0xd \
+-device xio3130-downstream,port=14,chassis=18,id=pci.18,bus=pci.3,addr=0xe \
+-device xio3130-downstream,port=15,chassis=19,id=pci.19,bus=pci.3,addr=0xf \
+-device xio3130-downstream,port=16,chassis=20,id=pci.20,bus=pci.3,addr=0x10 \
+-device xio3130-downstream,port=17,chassis=21,id=pci.21,bus=pci.3,addr=0x11 \
+-device xio3130-downstream,port=18,chassis=22,id=pci.22,bus=pci.3,addr=0x12 \
+-device xio3130-downstream,port=19,chassis=23,id=pci.23,bus=pci.3,addr=0x13 \
+-device xio3130-downstream,port=20,chassis=24,id=pci.24,bus=pci.3,addr=0x14 \
+-device xio3130-downstream,port=21,chassis=25,id=pci.25,bus=pci.3,addr=0x15 \
+-device xio3130-downstream,port=22,chassis=26,id=pci.26,bus=pci.3,addr=0x16 \
+-device xio3130-downstream,port=23,chassis=27,id=pci.27,bus=pci.3,addr=0x17 \
+-device xio3130-downstream,port=24,chassis=28,id=pci.28,bus=pci.3,addr=0x18 \
+-device xio3130-downstream,port=25,chassis=29,id=pci.29,bus=pci.3,addr=0x19 \
+-device xio3130-downstream,port=26,chassis=30,id=pci.30,bus=pci.3,addr=0x1a \
+-device xio3130-downstream,port=27,chassis=31,id=pci.31,bus=pci.3,addr=0x1b \
+-device xio3130-downstream,port=28,chassis=32,id=pci.32,bus=pci.3,addr=0x1c \
+-device xio3130-downstream,port=29,chassis=33,id=pci.33,bus=pci.3,addr=0x1d \
+-device xio3130-downstream,port=30,chassis=34,id=pci.34,bus=pci.3,addr=0x1e \
+-device xio3130-downstream,port=31,chassis=35,id=pci.35,bus=pci.3,addr=0x1f \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \
 -device ide-hd,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0,bootindex=1 \
 -netdev user,id=hostnet0 \
diff --git a/tests/qemuxml2argvdata/pcie-root-port-model-generic.args 
b/tests/qemuxml2argvdata/pcie-root-port-model-generic.args
index dabdefdf20..8c26233c83 100644
--- a/tests/qemuxml2argvdata/pcie-root-port-model-generic.args
+++ b/tests/qemuxml2argvdata/pcie-root-port-model-generic.args
@@ -25,7 +25,7 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device ioh3420,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 ioh3420,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/pcie-root-port-model-ioh3420.args 
b/tests/qemuxml2argvdata/pcie-root-port-model-ioh3420.args
index 7a47183bd1..a777ffd4ab 100644
--- a/tests/qemuxml2argvdata/pcie-root-port-model-ioh3420.args
+++ b/tests/qemuxml2argvdata/pcie-root-port-model-ioh3420.args
@@ -25,6 +25,6 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
ioh3420,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device ioh3420,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-device ioh3420,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
+-device ioh3420,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/pcie-root-port-nohotplug.x86_64-latest.args 
b/tests/qemuxml2argvdata/pcie-root-port-nohotplug.x86_64-latest.args
index a611e882da..a43f6dda90 100644
--- a/tests/qemuxml2argvdata/pcie-root-port-nohotplug.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/pcie-root-port-nohotplug.x86_64-latest.args
@@ -26,14 +26,14 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device 
pcie-root-port,port=0x9,chassis=2,id=pci.2,hotplug=off,bus=pcie.0,addr=0x1.0x1 \
--device 
ioh3420,port=0xa,chassis=3,id=pci.3,hotplug=off,bus=pcie.0,addr=0x1.0x2 \
+-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,hotplug=off,bus=pcie.0,addr=0x1.0x1 \
+-device ioh3420,port=10,chassis=3,id=pci.3,hotplug=off,bus=pcie.0,addr=0x1.0x2 
\
 -device x3130-upstream,id=pci.4,bus=pci.1,addr=0x0 \
--device 
xio3130-downstream,port=0x0,chassis=5,id=pci.5,hotplug=off,bus=pci.4,addr=0x0 \
--device 
xio3130-downstream,port=0x1,chassis=6,id=pci.6,hotplug=on,bus=pci.4,addr=0x1 \
--device xio3130-downstream,port=0x2,chassis=7,id=pci.7,bus=pci.4,addr=0x2 \
--device xio3130-downstream,port=0x27,chassis=30,id=pci.8,bus=pci.4,addr=0x3 \
+-device 
xio3130-downstream,port=0,chassis=5,id=pci.5,hotplug=off,bus=pci.4,addr=0x0 \
+-device 
xio3130-downstream,port=1,chassis=6,id=pci.6,hotplug=on,bus=pci.4,addr=0x1 \
+-device xio3130-downstream,port=2,chassis=7,id=pci.7,bus=pci.4,addr=0x2 \
+-device xio3130-downstream,port=39,chassis=30,id=pci.8,bus=pci.4,addr=0x3 \
 -device qemu-xhci,id=usb,bus=pci.2,addr=0x0 \
 -audiodev id=audio1,driver=none \
 -sandbox 
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
diff --git a/tests/qemuxml2argvdata/pcie-root-port.args 
b/tests/qemuxml2argvdata/pcie-root-port.args
index 0785bc5bd7..961cd51c3a 100644
--- a/tests/qemuxml2argvdata/pcie-root-port.args
+++ b/tests/qemuxml2argvdata/pcie-root-port.args
@@ -25,8 +25,8 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
ioh3420,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
--device ioh3420,port=0x1a,chassis=40,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
+-device 
ioh3420,port=16,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
+-device ioh3420,port=26,chassis=40,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \
 -device ide-hd,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0,bootindex=1 \
 -device 
qxl-vga,id=video0,ram_size=67108864,vram_size=33554432,bus=pcie.0,addr=0x1 \
diff --git a/tests/qemuxml2argvdata/pcie-switch-downstream-port.args 
b/tests/qemuxml2argvdata/pcie-switch-downstream-port.args
index 9becddc068..3b12252568 100644
--- a/tests/qemuxml2argvdata/pcie-switch-downstream-port.args
+++ b/tests/qemuxml2argvdata/pcie-switch-downstream-port.args
@@ -25,16 +25,16 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device ioh3420,port=0x10,chassis=1,id=pci.1,bus=pcie.0,addr=0x2 \
+-device ioh3420,port=16,chassis=1,id=pci.1,bus=pcie.0,addr=0x2 \
 -device x3130-upstream,id=pci.2,bus=pci.1,addr=0x0 \
--device xio3130-downstream,port=0x0,chassis=3,id=pci.3,bus=pci.2,addr=0x0 \
--device xio3130-downstream,port=0x1,chassis=4,id=pci.4,bus=pci.2,addr=0x1 \
--device xio3130-downstream,port=0x2,chassis=5,id=pci.5,bus=pci.2,addr=0x2 \
--device xio3130-downstream,port=0x27,chassis=30,id=pci.6,bus=pci.2,addr=0x3 \
+-device xio3130-downstream,port=0,chassis=3,id=pci.3,bus=pci.2,addr=0x0 \
+-device xio3130-downstream,port=1,chassis=4,id=pci.4,bus=pci.2,addr=0x1 \
+-device xio3130-downstream,port=2,chassis=5,id=pci.5,bus=pci.2,addr=0x2 \
+-device xio3130-downstream,port=39,chassis=30,id=pci.6,bus=pci.2,addr=0x3 \
 -device x3130-upstream,id=pci.7,bus=pci.3,addr=0x0 \
--device xio3130-downstream,port=0x4,chassis=8,id=pci.8,bus=pci.2,addr=0x4 \
--device xio3130-downstream,port=0x5,chassis=9,id=pci.9,bus=pci.2,addr=0x5 \
--device xio3130-downstream,port=0x6,chassis=10,id=pci.10,bus=pci.2,addr=0x6 \
+-device xio3130-downstream,port=4,chassis=8,id=pci.8,bus=pci.2,addr=0x4 \
+-device xio3130-downstream,port=5,chassis=9,id=pci.9,bus=pci.2,addr=0x5 \
+-device xio3130-downstream,port=6,chassis=10,id=pci.10,bus=pci.2,addr=0x6 \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \
 -device ide-hd,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0,bootindex=1 \
 -device 
qxl-vga,id=video0,ram_size=67108864,vram_size=33554432,bus=pcie.0,addr=0x1 \
diff --git a/tests/qemuxml2argvdata/pcie-switch-upstream-port.args 
b/tests/qemuxml2argvdata/pcie-switch-upstream-port.args
index 49b2e63773..067cfc81a8 100644
--- a/tests/qemuxml2argvdata/pcie-switch-upstream-port.args
+++ b/tests/qemuxml2argvdata/pcie-switch-upstream-port.args
@@ -25,8 +25,8 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
ioh3420,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
--device ioh3420,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
+-device 
ioh3420,port=16,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
+-device ioh3420,port=17,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
 -device x3130-upstream,id=pci.3,bus=pci.1,addr=0x0 \
 -device x3130-upstream,id=pci.4,bus=pci.2,addr=0x0 \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \
diff --git a/tests/qemuxml2argvdata/q35-default-devices-only.args 
b/tests/qemuxml2argvdata/q35-default-devices-only.args
index 696f37cc4e..b1d0aae894 100644
--- a/tests/qemuxml2argvdata/q35-default-devices-only.args
+++ b/tests/qemuxml2argvdata/q35-default-devices-only.args
@@ -25,9 +25,9 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
ioh3420,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
--device ioh3420,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device ioh3420,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-device ioh3420,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
+-device ioh3420,port=9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
+-device ioh3420,port=10,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
 -device nec-usb-xhci,id=usb,bus=pci.1,addr=0x0 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/q35-multifunction.args 
b/tests/qemuxml2argvdata/q35-multifunction.args
index c065de9455..072a66110d 100644
--- a/tests/qemuxml2argvdata/q35-multifunction.args
+++ b/tests/qemuxml2argvdata/q35-multifunction.args
@@ -25,24 +25,24 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
ioh3420,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
--device ioh3420,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
--device ioh3420,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
--device 
ioh3420,port=0x18,chassis=4,id=pci.4,bus=pcie.0,multifunction=on,addr=0x3 \
--device 
ioh3420,port=0x19,chassis=5,id=pci.5,bus=pcie.0,multifunction=on,addr=0x3.0x1 \
--device 
ioh3420,port=0x20,chassis=6,id=pci.6,bus=pcie.0,multifunction=off,addr=0x4 \
--device ioh3420,port=0x21,chassis=7,id=pci.7,bus=pcie.0,addr=0x4.0x1 \
--device 
ioh3420,port=0x8,chassis=8,id=pci.8,bus=pcie.0,multifunction=on,addr=0x1 \
--device ioh3420,port=0x9,chassis=9,id=pci.9,bus=pcie.0,addr=0x1.0x1 \
--device ioh3420,port=0xa,chassis=10,id=pci.10,bus=pcie.0,addr=0x1.0x2 \
--device ioh3420,port=0xb,chassis=11,id=pci.11,bus=pcie.0,addr=0x1.0x3 \
--device ioh3420,port=0xc,chassis=12,id=pci.12,bus=pcie.0,addr=0x1.0x4 \
--device ioh3420,port=0xd,chassis=13,id=pci.13,bus=pcie.0,addr=0x1.0x5 \
--device ioh3420,port=0xe,chassis=14,id=pci.14,bus=pcie.0,addr=0x1.0x6 \
--device ioh3420,port=0xf,chassis=15,id=pci.15,bus=pcie.0,addr=0x1.0x7 \
--device ioh3420,port=0x13,chassis=16,id=pci.16,bus=pcie.0,addr=0x2.0x3 \
--device ioh3420,port=0x14,chassis=17,id=pci.17,bus=pcie.0,addr=0x2.0x4 \
--device ioh3420,port=0x15,chassis=18,id=pci.18,bus=pcie.0,addr=0x2.0x5 \
+-device 
ioh3420,port=16,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
+-device ioh3420,port=17,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
+-device ioh3420,port=18,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
+-device 
ioh3420,port=24,chassis=4,id=pci.4,bus=pcie.0,multifunction=on,addr=0x3 \
+-device 
ioh3420,port=25,chassis=5,id=pci.5,bus=pcie.0,multifunction=on,addr=0x3.0x1 \
+-device 
ioh3420,port=32,chassis=6,id=pci.6,bus=pcie.0,multifunction=off,addr=0x4 \
+-device ioh3420,port=33,chassis=7,id=pci.7,bus=pcie.0,addr=0x4.0x1 \
+-device ioh3420,port=8,chassis=8,id=pci.8,bus=pcie.0,multifunction=on,addr=0x1 
\
+-device ioh3420,port=9,chassis=9,id=pci.9,bus=pcie.0,addr=0x1.0x1 \
+-device ioh3420,port=10,chassis=10,id=pci.10,bus=pcie.0,addr=0x1.0x2 \
+-device ioh3420,port=11,chassis=11,id=pci.11,bus=pcie.0,addr=0x1.0x3 \
+-device ioh3420,port=12,chassis=12,id=pci.12,bus=pcie.0,addr=0x1.0x4 \
+-device ioh3420,port=13,chassis=13,id=pci.13,bus=pcie.0,addr=0x1.0x5 \
+-device ioh3420,port=14,chassis=14,id=pci.14,bus=pcie.0,addr=0x1.0x6 \
+-device ioh3420,port=15,chassis=15,id=pci.15,bus=pcie.0,addr=0x1.0x7 \
+-device ioh3420,port=19,chassis=16,id=pci.16,bus=pcie.0,addr=0x2.0x3 \
+-device ioh3420,port=20,chassis=17,id=pci.17,bus=pcie.0,addr=0x2.0x4 \
+-device ioh3420,port=21,chassis=18,id=pci.18,bus=pcie.0,addr=0x2.0x5 \
 -device nec-usb-xhci,id=usb,bus=pci.1,addr=0x0 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/q35-pci-force-address.args 
b/tests/qemuxml2argvdata/q35-pci-force-address.args
index fc6f182c1f..f449c6158f 100644
--- a/tests/qemuxml2argvdata/q35-pci-force-address.args
+++ b/tests/qemuxml2argvdata/q35-pci-force-address.args
@@ -27,7 +27,7 @@ QEMU_AUDIO_DRV=none \
 -boot strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
+-device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
 -netdev user,id=hostnet0 \
 -device 
e1000e,netdev=hostnet0,id=net0,mac=52:54:00:aa:bf:ef,bus=pci.2,addr=0x1 \
 -device intel-hda,id=sound0,bus=pci.3,addr=0x0 \
diff --git a/tests/qemuxml2argvdata/q35-pcie-autoadd.args 
b/tests/qemuxml2argvdata/q35-pcie-autoadd.args
index 1113eecc42..4398b66349 100644
--- a/tests/qemuxml2argvdata/q35-pcie-autoadd.args
+++ b/tests/qemuxml2argvdata/q35-pcie-autoadd.args
@@ -25,20 +25,20 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
ioh3420,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
--device ioh3420,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
--device ioh3420,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
--device ioh3420,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
--device ioh3420,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \
--device ioh3420,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \
--device ioh3420,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 \
--device ioh3420,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7 \
--device 
ioh3420,port=0x18,chassis=9,id=pci.9,bus=pcie.0,multifunction=on,addr=0x3 \
--device ioh3420,port=0x19,chassis=10,id=pci.10,bus=pcie.0,addr=0x3.0x1 \
--device ioh3420,port=0x1a,chassis=11,id=pci.11,bus=pcie.0,addr=0x3.0x2 \
--device ioh3420,port=0x1b,chassis=12,id=pci.12,bus=pcie.0,addr=0x3.0x3 \
--device ioh3420,port=0x1c,chassis=13,id=pci.13,bus=pcie.0,addr=0x3.0x4 \
--device ioh3420,port=0x1d,chassis=14,id=pci.14,bus=pcie.0,addr=0x3.0x5 \
+-device 
ioh3420,port=16,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
+-device ioh3420,port=17,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
+-device ioh3420,port=18,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
+-device ioh3420,port=19,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
+-device ioh3420,port=20,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \
+-device ioh3420,port=21,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \
+-device ioh3420,port=22,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 \
+-device ioh3420,port=23,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7 \
+-device 
ioh3420,port=24,chassis=9,id=pci.9,bus=pcie.0,multifunction=on,addr=0x3 \
+-device ioh3420,port=25,chassis=10,id=pci.10,bus=pcie.0,addr=0x3.0x1 \
+-device ioh3420,port=26,chassis=11,id=pci.11,bus=pcie.0,addr=0x3.0x2 \
+-device ioh3420,port=27,chassis=12,id=pci.12,bus=pcie.0,addr=0x3.0x3 \
+-device ioh3420,port=28,chassis=13,id=pci.13,bus=pcie.0,addr=0x3.0x4 \
+-device ioh3420,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 \
diff --git a/tests/qemuxml2argvdata/q35-pcie.args 
b/tests/qemuxml2argvdata/q35-pcie.args
index 4c4a716417..c91f43060b 100644
--- a/tests/qemuxml2argvdata/q35-pcie.args
+++ b/tests/qemuxml2argvdata/q35-pcie.args
@@ -27,19 +27,19 @@ QEMU_AUDIO_DRV=none \
 -boot strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device 
ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,multifunction=on,addr=0x2 \
--device ioh3420,port=0x11,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x1 \
--device ioh3420,port=0x12,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x2 \
--device ioh3420,port=0x13,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x3 \
--device ioh3420,port=0x14,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x4 \
--device ioh3420,port=0x15,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x5 \
--device ioh3420,port=0x16,chassis=9,id=pci.9,bus=pcie.0,addr=0x2.0x6 \
--device ioh3420,port=0x17,chassis=10,id=pci.10,bus=pcie.0,addr=0x2.0x7 \
--device 
ioh3420,port=0x18,chassis=11,id=pci.11,bus=pcie.0,multifunction=on,addr=0x3 \
--device ioh3420,port=0x19,chassis=12,id=pci.12,bus=pcie.0,addr=0x3.0x1 \
--device ioh3420,port=0x1a,chassis=13,id=pci.13,bus=pcie.0,addr=0x3.0x2 \
--device ioh3420,port=0x1b,chassis=14,id=pci.14,bus=pcie.0,addr=0x3.0x3 \
--device ioh3420,port=0x1c,chassis=15,id=pci.15,bus=pcie.0,addr=0x3.0x4 \
+-device 
ioh3420,port=16,chassis=3,id=pci.3,bus=pcie.0,multifunction=on,addr=0x2 \
+-device ioh3420,port=17,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x1 \
+-device ioh3420,port=18,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x2 \
+-device ioh3420,port=19,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x3 \
+-device ioh3420,port=20,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x4 \
+-device ioh3420,port=21,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x5 \
+-device ioh3420,port=22,chassis=9,id=pci.9,bus=pcie.0,addr=0x2.0x6 \
+-device ioh3420,port=23,chassis=10,id=pci.10,bus=pcie.0,addr=0x2.0x7 \
+-device 
ioh3420,port=24,chassis=11,id=pci.11,bus=pcie.0,multifunction=on,addr=0x3 \
+-device ioh3420,port=25,chassis=12,id=pci.12,bus=pcie.0,addr=0x3.0x1 \
+-device ioh3420,port=26,chassis=13,id=pci.13,bus=pcie.0,addr=0x3.0x2 \
+-device ioh3420,port=27,chassis=14,id=pci.14,bus=pcie.0,addr=0x3.0x3 \
+-device ioh3420,port=28,chassis=15,id=pci.15,bus=pcie.0,addr=0x3.0x4 \
 -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 \
diff --git a/tests/qemuxml2argvdata/q35-pm-disable-fallback.args 
b/tests/qemuxml2argvdata/q35-pm-disable-fallback.args
index 5b35c49a5c..c610cf624f 100644
--- a/tests/qemuxml2argvdata/q35-pm-disable-fallback.args
+++ b/tests/qemuxml2argvdata/q35-pm-disable-fallback.args
@@ -29,6 +29,6 @@ QEMU_AUDIO_DRV=none \
 -boot strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
+-device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x1 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/q35-pm-disable.args 
b/tests/qemuxml2argvdata/q35-pm-disable.args
index 380988992c..8a6fc387ac 100644
--- a/tests/qemuxml2argvdata/q35-pm-disable.args
+++ b/tests/qemuxml2argvdata/q35-pm-disable.args
@@ -29,6 +29,6 @@ QEMU_AUDIO_DRV=none \
 -boot strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
+-device ioh3420,port=8,chassis=3,id=pci.3,bus=pcie.0,addr=0x1 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x1 \
 -msg timestamp=on
diff --git a/tests/qemuxml2argvdata/q35-virt-manager-basic.args 
b/tests/qemuxml2argvdata/q35-virt-manager-basic.args
index 19a134919c..3586752cee 100644
--- a/tests/qemuxml2argvdata/q35-virt-manager-basic.args
+++ b/tests/qemuxml2argvdata/q35-virt-manager-basic.args
@@ -26,12 +26,12 @@ QEMU_AUDIO_DRV=spice \
 -global ICH9-LPC.disable_s3=1 \
 -global ICH9-LPC.disable_s4=1 \
 -boot strict=on \
--device 
ioh3420,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
--device ioh3420,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
--device ioh3420,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
--device ioh3420,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
--device ioh3420,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \
--device ioh3420,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \
+-device 
ioh3420,port=16,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
+-device ioh3420,port=17,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
+-device ioh3420,port=18,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
+-device ioh3420,port=19,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
+-device ioh3420,port=20,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \
+-device ioh3420,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 \
 -drive 
file=/var/lib/libvirt/images/basic.qcow2,format=qcow2,if=none,id=drive-virtio-disk0
 \
diff --git a/tests/qemuxml2argvdata/q35-virtio-pci.args 
b/tests/qemuxml2argvdata/q35-virtio-pci.args
index 94da3660b5..7c6fd24dab 100644
--- a/tests/qemuxml2argvdata/q35-virtio-pci.args
+++ b/tests/qemuxml2argvdata/q35-virtio-pci.args
@@ -27,19 +27,19 @@ QEMU_AUDIO_DRV=none \
 -boot strict=on \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device 
ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,multifunction=on,addr=0x2 \
--device ioh3420,port=0x11,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x1 \
--device ioh3420,port=0x12,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x2 \
--device ioh3420,port=0x13,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x3 \
--device ioh3420,port=0x14,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x4 \
--device ioh3420,port=0x15,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x5 \
--device ioh3420,port=0x16,chassis=9,id=pci.9,bus=pcie.0,addr=0x2.0x6 \
--device ioh3420,port=0x17,chassis=10,id=pci.10,bus=pcie.0,addr=0x2.0x7 \
--device 
ioh3420,port=0x18,chassis=11,id=pci.11,bus=pcie.0,multifunction=on,addr=0x3 \
--device ioh3420,port=0x19,chassis=12,id=pci.12,bus=pcie.0,addr=0x3.0x1 \
--device ioh3420,port=0x1a,chassis=13,id=pci.13,bus=pcie.0,addr=0x3.0x2 \
--device ioh3420,port=0x1b,chassis=14,id=pci.14,bus=pcie.0,addr=0x3.0x3 \
--device ioh3420,port=0x1c,chassis=15,id=pci.15,bus=pcie.0,addr=0x3.0x4 \
+-device 
ioh3420,port=16,chassis=3,id=pci.3,bus=pcie.0,multifunction=on,addr=0x2 \
+-device ioh3420,port=17,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x1 \
+-device ioh3420,port=18,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x2 \
+-device ioh3420,port=19,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x3 \
+-device ioh3420,port=20,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x4 \
+-device ioh3420,port=21,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x5 \
+-device ioh3420,port=22,chassis=9,id=pci.9,bus=pcie.0,addr=0x2.0x6 \
+-device ioh3420,port=23,chassis=10,id=pci.10,bus=pcie.0,addr=0x2.0x7 \
+-device 
ioh3420,port=24,chassis=11,id=pci.11,bus=pcie.0,multifunction=on,addr=0x3 \
+-device ioh3420,port=25,chassis=12,id=pci.12,bus=pcie.0,addr=0x3.0x1 \
+-device ioh3420,port=26,chassis=13,id=pci.13,bus=pcie.0,addr=0x3.0x2 \
+-device ioh3420,port=27,chassis=14,id=pci.14,bus=pcie.0,addr=0x3.0x3 \
+-device ioh3420,port=28,chassis=15,id=pci.15,bus=pcie.0,addr=0x3.0x4 \
 -device nec-usb-xhci,id=usb,bus=pci.4,addr=0x0 \
 -device virtio-scsi-pci,id=scsi0,bus=pci.2,addr=0x4 \
 -device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x3 \
diff --git a/tests/qemuxml2argvdata/riscv64-virt-graphics.riscv64-latest.args 
b/tests/qemuxml2argvdata/riscv64-virt-graphics.riscv64-latest.args
index 90563fbfeb..7aeca86674 100644
--- a/tests/qemuxml2argvdata/riscv64-virt-graphics.riscv64-latest.args
+++ b/tests/qemuxml2argvdata/riscv64-virt-graphics.riscv64-latest.args
@@ -22,14 +22,14 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
--device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
--device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
--device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
--device pcie-root-port,port=0xf,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \
+-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 pcie-root-port,port=11,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-device pcie-root-port,port=12,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
+-device pcie-root-port,port=13,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
+-device pcie-root-port,port=14,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
+-device pcie-root-port,port=15,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \
 -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \
 -device virtio-serial-pci,id=virtio-serial0,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"}'
 \
diff --git a/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args 
b/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args
index 4f50061eea..0e5609f158 100644
--- a/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args
+++ b/tests/qemuxml2argvdata/riscv64-virt-headless.riscv64-latest.args
@@ -23,13 +23,13 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
--device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
--device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
--device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
+-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 pcie-root-port,port=11,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-device pcie-root-port,port=12,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
+-device pcie-root-port,port=13,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
+-device pcie-root-port,port=14,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
 -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \
 -device virtio-serial-pci,id=virtio-serial0,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"}'
 \
diff --git a/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args 
b/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
index 7810ef49e8..ed72935350 100644
--- a/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/tseg-explicit-size.x86_64-latest.args
@@ -27,9 +27,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
+-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 \
 -audiodev id=audio1,driver=none \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0 \
diff --git a/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args 
b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args
index 4158456744..8743ef8d3f 100644
--- a/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/vhost-user-fs-hugepages.x86_64-latest.args
@@ -26,10 +26,10 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-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 pcie-root-port,port=11,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
 -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 
virtio-blk-pci,bus=pci.4,addr=0x0,drive=libvirt-1-format,id=virtio-disk0,bootindex=1
 \
diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args 
b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args
index 5d448c121f..a482d60423 100644
--- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-3.1.0.args
@@ -25,17 +25,17 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
--device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
--device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
--device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
--device pcie-root-port,port=0xf,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \
--device 
pcie-root-port,port=0x10,chassis=9,id=pci.9,bus=pcie.0,multifunction=on,addr=0x2
 \
--device pcie-root-port,port=0x11,chassis=10,id=pci.10,bus=pcie.0,addr=0x2.0x1 \
--device pcie-root-port,port=0x12,chassis=11,id=pci.11,bus=pcie.0,addr=0x2.0x2 \
+-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 pcie-root-port,port=11,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-device pcie-root-port,port=12,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
+-device pcie-root-port,port=13,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
+-device pcie-root-port,port=14,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
+-device pcie-root-port,port=15,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \
+-device 
pcie-root-port,port=16,chassis=9,id=pci.9,bus=pcie.0,multifunction=on,addr=0x2 \
+-device pcie-root-port,port=17,chassis=10,id=pci.10,bus=pcie.0,addr=0x2.0x1 \
+-device pcie-root-port,port=18,chassis=11,id=pci.11,bus=pcie.0,addr=0x2.0x2 \
 -device 
virtio-scsi-pci,disable-legacy=on,disable-modern=off,id=scsi0,bus=pci.4,addr=0x0
 \
 -device 
virtio-serial-pci,disable-legacy=on,disable-modern=off,id=virtio-serial0,bus=pci.3,addr=0x0
 \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \
diff --git a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args 
b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
index 5385e30e40..305e2cbc2f 100644
--- a/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-non-transitional.x86_64-latest.args
@@ -26,17 +26,17 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
--device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
--device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
--device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
--device pcie-root-port,port=0xf,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \
--device 
pcie-root-port,port=0x10,chassis=9,id=pci.9,bus=pcie.0,multifunction=on,addr=0x2
 \
--device pcie-root-port,port=0x11,chassis=10,id=pci.10,bus=pcie.0,addr=0x2.0x1 \
--device pcie-root-port,port=0x12,chassis=11,id=pci.11,bus=pcie.0,addr=0x2.0x2 \
+-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 pcie-root-port,port=11,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-device pcie-root-port,port=12,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
+-device pcie-root-port,port=13,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
+-device pcie-root-port,port=14,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
+-device pcie-root-port,port=15,chassis=8,id=pci.8,bus=pcie.0,addr=0x1.0x7 \
+-device 
pcie-root-port,port=16,chassis=9,id=pci.9,bus=pcie.0,multifunction=on,addr=0x2 \
+-device pcie-root-port,port=17,chassis=10,id=pci.10,bus=pcie.0,addr=0x2.0x1 \
+-device pcie-root-port,port=18,chassis=11,id=pci.11,bus=pcie.0,addr=0x2.0x2 \
 -device virtio-scsi-pci-non-transitional,id=scsi0,bus=pci.4,addr=0x0 \
 -device 
virtio-serial-pci-non-transitional,id=virtio-serial0,bus=pci.3,addr=0x0 \
 -blockdev 
'{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}'
 \
diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args 
b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
index 386660fb1a..6699bfb104 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-3.1.0.args
@@ -25,9 +25,9 @@ QEMU_AUDIO_DRV=none \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
+-device 
pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
 -device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
--device pcie-root-port,port=0x9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
+-device pcie-root-port,port=9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
 -device 
virtio-scsi-pci,disable-legacy=off,disable-modern=off,id=scsi0,bus=pci.2,addr=0x4
 \
 -device 
virtio-serial-pci,disable-legacy=off,disable-modern=off,id=virtio-serial0,bus=pci.2,addr=0x3
 \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-virtio-disk0 \
diff --git a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args 
b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
index 2f6714a28e..8c2dbfebd8 100644
--- a/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/virtio-transitional.x86_64-latest.args
@@ -26,9 +26,9 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
 -no-shutdown \
 -no-acpi \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
+-device 
pcie-root-port,port=8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 \
 -device pcie-pci-bridge,id=pci.2,bus=pci.1,addr=0x0 \
--device pcie-root-port,port=0x9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
+-device pcie-root-port,port=9,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x1 \
 -device virtio-scsi-pci-transitional,id=scsi0,bus=pci.2,addr=0x4 \
 -device 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 e327dd919e..c1501e6c0a 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
@@ -25,10 +25,10 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-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 pcie-root-port,port=11,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
 -device qemu-xhci,id=usb,bus=pci.1,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"}'
 \
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 f0a5dbf2b9..d4f7980e5d 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
@@ -25,10 +25,10 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -rtc base=utc \
 -no-shutdown \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-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 pcie-root-port,port=11,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
 -device qemu-xhci,id=usb,bus=pci.1,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"}'
 \
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 fbae37342b..4ba4567e86 100644
--- a/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-q35-graphics.x86_64-latest.args
@@ -28,13 +28,13 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -global ICH9-LPC.disable_s3=1 \
 -global ICH9-LPC.disable_s4=1 \
 -boot strict=on \
--device 
pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2
 \
--device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
--device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
--device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
--device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \
--device pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \
--device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 \
+-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 qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \
 -device virtio-serial-pci,id=virtio-serial0,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"}'
 \
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 5b5d980f41..26fe95eac3 100644
--- a/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/x86_64-q35-headless.x86_64-latest.args
@@ -29,13 +29,13 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-guest/.config \
 -global ICH9-LPC.disable_s3=1 \
 -global ICH9-LPC.disable_s4=1 \
 -boot strict=on \
--device 
pcie-root-port,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
\
--device pcie-root-port,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 \
--device pcie-root-port,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 \
--device pcie-root-port,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
--device pcie-root-port,port=0xc,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
--device pcie-root-port,port=0xd,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
--device pcie-root-port,port=0xe,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
+-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 pcie-root-port,port=11,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 \
+-device pcie-root-port,port=12,chassis=5,id=pci.5,bus=pcie.0,addr=0x1.0x4 \
+-device pcie-root-port,port=13,chassis=6,id=pci.6,bus=pcie.0,addr=0x1.0x5 \
+-device pcie-root-port,port=14,chassis=7,id=pci.7,bus=pcie.0,addr=0x1.0x6 \
 -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \
 -device virtio-serial-pci,id=virtio-serial0,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"}'
 \
-- 
2.31.1

Reply via email to