[PATCH v2 8/8] conf: aggregate multiple pcie-root-ports onto a single slot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set the VIR_PCI_CONNECT_AGGREGATE_SLOT flag for pcie-root-ports so
that they will be assigned to all the functions on a slot.

Some qemu test case outputs had to be adjusted due to the
pcie-root-ports now being put on multiple functions.
---
 src/conf/domain_addr.c                             |  2 +-
 .../qemuxml2argv-pcie-root-port.args               |  5 +-
 .../qemuxml2argv-pcie-switch-upstream-port.args    |  5 +-
 .../qemuxml2argv-q35-default-devices-only.args     |  7 +--
 .../qemuxml2argv-q35-multifunction.args            | 12 +++++
 .../qemuxml2argv-q35-multifunction.xml             | 11 +++++
 .../qemuxml2argv-q35-pcie-autoadd.args             | 30 ++++++------
 tests/qemuxml2argvdata/qemuxml2argv-q35-pcie.args  | 28 ++++++-----
 .../qemuxml2argv-q35-virt-manager-basic.args       | 13 ++---
 .../qemuxml2argv-q35-virtio-pci.args               | 28 ++++++-----
 tests/qemuxml2argvtest.c                           |  2 +
 .../qemuxml2xmlout-pcie-root-port.xml              |  2 +-
 .../qemuxml2xmlout-pcie-switch-upstream-port.xml   |  4 +-
 .../qemuxml2xmlout-q35-default-devices-only.xml    |  8 ++--
 .../qemuxml2xmlout-q35-multifunction.xml           | 55 ++++++++++++++++++++++
 .../qemuxml2xmlout-q35-pcie-autoadd.xml            | 52 ++++++++++----------
 .../qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie.xml | 48 +++++++++----------
 .../qemuxml2xmlout-q35-virt-manager-basic.xml      | 20 ++++----
 .../qemuxml2xmlout-q35-virtio-pci.xml              | 48 +++++++++----------
 tests/qemuxml2xmltest.c                            |  2 +
 20 files changed, 237 insertions(+), 145 deletions(-)

diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c
index 1ab9a6d..56b7f3f 100644
--- a/src/conf/domain_addr.c
+++ b/src/conf/domain_addr.c
@@ -63,7 +63,7 @@ virDomainPCIControllerModelToConnectType(virDomainControllerModelPCI model)
         return VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE;
 
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT:
-        return VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT;
+        return VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT | VIR_PCI_CONNECT_AGGREGATE_SLOT;
 
     case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT:
         return VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT;
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.args b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.args
index 27d5164..9a71281 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.args
@@ -18,8 +18,9 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
--device ioh3420,port=0x1a,chassis=40,id=pci.4,bus=pcie.0,addr=0x3 \
+-device ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,multifunction=on,\
+addr=0x2 \
+-device ioh3420,port=0x1a,chassis=40,id=pci.4,bus=pcie.0,addr=0x2.0x1 \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \
 -device ide-drive,bus=ide.0,drive=drive-sata0-0-0,id=sata0-0-0 \
 -device qxl-vga,id=video0,ram_size=67108864,vram_size=33554432,bus=pcie.0,\
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-upstream-port.args b/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-upstream-port.args
index 93d16b8..10aedd5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-upstream-port.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-switch-upstream-port.args
@@ -18,8 +18,9 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
--device ioh3420,port=0x18,chassis=4,id=pci.4,bus=pcie.0,addr=0x3 \
+-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 x3130-upstream,id=pci.5,bus=pci.3,addr=0x0 \
 -device x3130-upstream,id=pci.6,bus=pci.4,addr=0x0 \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-sata0-0-0 \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-default-devices-only.args b/tests/qemuxml2argvdata/qemuxml2argv-q35-default-devices-only.args
index 9d13466..30fc9b7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-q35-default-devices-only.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-default-devices-only.args
@@ -16,8 +16,9 @@ QEMU_AUDIO_DRV=none \
 -monitor unix:/tmp/lib/domain--1-q35-test/monitor.sock,server,nowait \
 -no-acpi \
 -boot c \
--device ioh3420,port=0x8,chassis=1,id=pci.1,bus=pcie.0,addr=0x1 \
--device ioh3420,port=0x10,chassis=2,id=pci.2,bus=pcie.0,addr=0x2 \
--device ioh3420,port=0x18,chassis=3,id=pci.3,bus=pcie.0,addr=0x3 \
+-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 nec-usb-xhci,id=usb,bus=pci.1,addr=0x0 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-multifunction.args b/tests/qemuxml2argvdata/qemuxml2argv-q35-multifunction.args
index de1a4a4..1b60744 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-q35-multifunction.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-multifunction.args
@@ -27,5 +27,17 @@ 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 nec-usb-xhci,id=usb,bus=pci.1,addr=0x0 \
 -device virtio-balloon-pci,id=balloon0,bus=pci.2,addr=0x0
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-multifunction.xml b/tests/qemuxml2argvdata/qemuxml2argv-q35-multifunction.xml
index b1f3c5e..c1edca1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-q35-multifunction.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-multifunction.xml
@@ -36,5 +36,16 @@
     <controller type='pci' model='pcie-root-port'>
       <address type='pci' slot='4' function='1'/>
     </controller>
+    <controller type='pci' model='pcie-root-port'/>
+    <controller type='pci' model='pcie-root-port'/>
+    <controller type='pci' model='pcie-root-port'/>
+    <controller type='pci' model='pcie-root-port'/>
+    <controller type='pci' model='pcie-root-port'/>
+    <controller type='pci' model='pcie-root-port'/>
+    <controller type='pci' model='pcie-root-port'/>
+    <controller type='pci' model='pcie-root-port'/>
+    <controller type='pci' model='pcie-root-port'/>
+    <controller type='pci' model='pcie-root-port'/>
+    <controller type='pci' model='pcie-root-port'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-pcie-autoadd.args b/tests/qemuxml2argvdata/qemuxml2argv-q35-pcie-autoadd.args
index ba26326..f3d44c0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-q35-pcie-autoadd.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-pcie-autoadd.args
@@ -16,20 +16,22 @@ QEMU_AUDIO_DRV=none \
 -monitor unix:/tmp/lib/domain--1-q35-test/monitor.sock,server,nowait \
 -no-acpi \
 -boot c \
--device ioh3420,port=0x10,chassis=1,id=pci.1,bus=pcie.0,addr=0x2 \
--device ioh3420,port=0x18,chassis=2,id=pci.2,bus=pcie.0,addr=0x3 \
--device ioh3420,port=0x20,chassis=3,id=pci.3,bus=pcie.0,addr=0x4 \
--device ioh3420,port=0x28,chassis=4,id=pci.4,bus=pcie.0,addr=0x5 \
--device ioh3420,port=0x30,chassis=5,id=pci.5,bus=pcie.0,addr=0x6 \
--device ioh3420,port=0x38,chassis=6,id=pci.6,bus=pcie.0,addr=0x7 \
--device ioh3420,port=0x40,chassis=7,id=pci.7,bus=pcie.0,addr=0x8 \
--device ioh3420,port=0x48,chassis=8,id=pci.8,bus=pcie.0,addr=0x9 \
--device ioh3420,port=0x50,chassis=9,id=pci.9,bus=pcie.0,addr=0xa \
--device ioh3420,port=0x58,chassis=10,id=pci.10,bus=pcie.0,addr=0xb \
--device ioh3420,port=0x60,chassis=11,id=pci.11,bus=pcie.0,addr=0xc \
--device ioh3420,port=0x68,chassis=12,id=pci.12,bus=pcie.0,addr=0xd \
--device ioh3420,port=0x70,chassis=13,id=pci.13,bus=pcie.0,addr=0xe \
--device ioh3420,port=0x78,chassis=14,id=pci.14,bus=pcie.0,addr=0xf \
+-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 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/qemuxml2argv-q35-pcie.args b/tests/qemuxml2argvdata/qemuxml2argv-q35-pcie.args
index 2738749..3b507f3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-q35-pcie.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-pcie.args
@@ -18,19 +18,21 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
--device ioh3420,port=0x18,chassis=4,id=pci.4,bus=pcie.0,addr=0x3 \
--device ioh3420,port=0x20,chassis=5,id=pci.5,bus=pcie.0,addr=0x4 \
--device ioh3420,port=0x28,chassis=6,id=pci.6,bus=pcie.0,addr=0x5 \
--device ioh3420,port=0x30,chassis=7,id=pci.7,bus=pcie.0,addr=0x6 \
--device ioh3420,port=0x38,chassis=8,id=pci.8,bus=pcie.0,addr=0x7 \
--device ioh3420,port=0x40,chassis=9,id=pci.9,bus=pcie.0,addr=0x8 \
--device ioh3420,port=0x48,chassis=10,id=pci.10,bus=pcie.0,addr=0x9 \
--device ioh3420,port=0x50,chassis=11,id=pci.11,bus=pcie.0,addr=0xa \
--device ioh3420,port=0x58,chassis=12,id=pci.12,bus=pcie.0,addr=0xb \
--device ioh3420,port=0x60,chassis=13,id=pci.13,bus=pcie.0,addr=0xc \
--device ioh3420,port=0x68,chassis=14,id=pci.14,bus=pcie.0,addr=0xd \
--device ioh3420,port=0x70,chassis=15,id=pci.15,bus=pcie.0,addr=0xe \
+-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 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/qemuxml2argv-q35-virt-manager-basic.args b/tests/qemuxml2argvdata/qemuxml2argv-q35-virt-manager-basic.args
index 60af251..e139e52 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-q35-virt-manager-basic.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-virt-manager-basic.args
@@ -18,12 +18,13 @@ QEMU_AUDIO_DRV=spice \
 -global ICH9-LPC.disable_s3=1 \
 -global ICH9-LPC.disable_s4=1 \
 -boot c \
--device ioh3420,port=0x10,chassis=1,id=pci.1,bus=pcie.0,addr=0x2 \
--device ioh3420,port=0x18,chassis=2,id=pci.2,bus=pcie.0,addr=0x3 \
--device ioh3420,port=0x20,chassis=3,id=pci.3,bus=pcie.0,addr=0x4 \
--device ioh3420,port=0x28,chassis=4,id=pci.4,bus=pcie.0,addr=0x5 \
--device ioh3420,port=0x30,chassis=5,id=pci.5,bus=pcie.0,addr=0x6 \
--device ioh3420,port=0x38,chassis=6,id=pci.6,bus=pcie.0,addr=0x7 \
+-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 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,\
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-q35-virtio-pci.args b/tests/qemuxml2argvdata/qemuxml2argv-q35-virtio-pci.args
index cada05e..a1025dc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-q35-virtio-pci.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-virtio-pci.args
@@ -18,19 +18,21 @@ QEMU_AUDIO_DRV=none \
 -boot c \
 -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1e \
 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 \
--device ioh3420,port=0x10,chassis=3,id=pci.3,bus=pcie.0,addr=0x2 \
--device ioh3420,port=0x18,chassis=4,id=pci.4,bus=pcie.0,addr=0x3 \
--device ioh3420,port=0x20,chassis=5,id=pci.5,bus=pcie.0,addr=0x4 \
--device ioh3420,port=0x28,chassis=6,id=pci.6,bus=pcie.0,addr=0x5 \
--device ioh3420,port=0x30,chassis=7,id=pci.7,bus=pcie.0,addr=0x6 \
--device ioh3420,port=0x38,chassis=8,id=pci.8,bus=pcie.0,addr=0x7 \
--device ioh3420,port=0x40,chassis=9,id=pci.9,bus=pcie.0,addr=0x8 \
--device ioh3420,port=0x48,chassis=10,id=pci.10,bus=pcie.0,addr=0x9 \
--device ioh3420,port=0x50,chassis=11,id=pci.11,bus=pcie.0,addr=0xa \
--device ioh3420,port=0x58,chassis=12,id=pci.12,bus=pcie.0,addr=0xb \
--device ioh3420,port=0x60,chassis=13,id=pci.13,bus=pcie.0,addr=0xc \
--device ioh3420,port=0x68,chassis=14,id=pci.14,bus=pcie.0,addr=0xd \
--device ioh3420,port=0x70,chassis=15,id=pci.15,bus=pcie.0,addr=0xe \
+-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 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/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 20ea95b..3e3c18d 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1943,6 +1943,7 @@ mymain(void)
             QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
             QEMU_CAPS_DEVICE_IOH3420,
             QEMU_CAPS_ICH9_AHCI,
+            QEMU_CAPS_PCI_MULTIFUNCTION,
             QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
             QEMU_CAPS_DEVICE_QXL);
     DO_TEST("autoindex",
@@ -1986,6 +1987,7 @@ mymain(void)
             QEMU_CAPS_DEVICE_IOH3420,
             QEMU_CAPS_DEVICE_X3130_UPSTREAM,
             QEMU_CAPS_ICH9_AHCI,
+            QEMU_CAPS_PCI_MULTIFUNCTION,
             QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
             QEMU_CAPS_DEVICE_QXL);
     DO_TEST("pcie-switch-downstream-port",
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml
index a4ff820..082dd6c 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml
@@ -37,7 +37,7 @@
     <controller type='pci' index='4' model='pcie-root-port'>
       <model name='ioh3420'/>
       <target chassis='40' port='0x1a'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
     </controller>
     <controller type='sata' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml
index 53e10d0..52c9177 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml
@@ -36,8 +36,8 @@
     </controller>
     <controller type='pci' index='4' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='4' port='0x18'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <target chassis='4' port='0x11'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
     </controller>
     <controller type='pci' index='5' model='pcie-switch-upstream-port'>
       <model name='x3130-upstream'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-default-devices-only.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-default-devices-only.xml
index e64b80c..e8a7d8c 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-default-devices-only.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-default-devices-only.xml
@@ -28,13 +28,13 @@
     </controller>
     <controller type='pci' index='2' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='2' port='0x10'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+      <target chassis='2' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
     </controller>
     <controller type='pci' index='3' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='3' port='0x18'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <target chassis='3' port='0xa'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-multifunction.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-multifunction.xml
index 3d5cd76..06b8144 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-multifunction.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-multifunction.xml
@@ -50,6 +50,61 @@
       <target chassis='7' port='0x21'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x1'/>
     </controller>
+    <controller type='pci' index='8' model='pcie-root-port'>
+      <model name='ioh3420'/>
+      <target chassis='8' port='0x8'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
+    </controller>
+    <controller type='pci' index='9' model='pcie-root-port'>
+      <model name='ioh3420'/>
+      <target chassis='9' port='0x9'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
+    </controller>
+    <controller type='pci' index='10' model='pcie-root-port'>
+      <model name='ioh3420'/>
+      <target chassis='10' port='0xa'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+    </controller>
+    <controller type='pci' index='11' model='pcie-root-port'>
+      <model name='ioh3420'/>
+      <target chassis='11' port='0xb'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
+    </controller>
+    <controller type='pci' index='12' model='pcie-root-port'>
+      <model name='ioh3420'/>
+      <target chassis='12' port='0xc'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
+    </controller>
+    <controller type='pci' index='13' model='pcie-root-port'>
+      <model name='ioh3420'/>
+      <target chassis='13' port='0xd'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
+    </controller>
+    <controller type='pci' index='14' model='pcie-root-port'>
+      <model name='ioh3420'/>
+      <target chassis='14' port='0xe'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
+    </controller>
+    <controller type='pci' index='15' model='pcie-root-port'>
+      <model name='ioh3420'/>
+      <target chassis='15' port='0xf'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>
+    </controller>
+    <controller type='pci' index='16' model='pcie-root-port'>
+      <model name='ioh3420'/>
+      <target chassis='16' port='0x13'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
+    </controller>
+    <controller type='pci' index='17' model='pcie-root-port'>
+      <model name='ioh3420'/>
+      <target chassis='17' port='0x14'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
+    </controller>
+    <controller type='pci' index='18' model='pcie-root-port'>
+      <model name='ioh3420'/>
+      <target chassis='18' port='0x15'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
+    </controller>
     <controller type='usb' index='0' model='nec-xhci'>
       <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
     </controller>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie-autoadd.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie-autoadd.xml
index 3742e14..28862c9 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie-autoadd.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie-autoadd.xml
@@ -39,68 +39,68 @@
     </controller>
     <controller type='pci' index='2' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='2' port='0x18'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <target chassis='2' port='0x11'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
     </controller>
     <controller type='pci' index='3' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='3' port='0x20'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <target chassis='3' port='0x12'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
     </controller>
     <controller type='pci' index='4' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='4' port='0x28'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <target chassis='4' port='0x13'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
     </controller>
     <controller type='pci' index='5' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='5' port='0x30'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+      <target chassis='5' port='0x14'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
     </controller>
     <controller type='pci' index='6' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='6' port='0x38'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+      <target chassis='6' port='0x15'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
     </controller>
     <controller type='pci' index='7' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='7' port='0x40'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+      <target chassis='7' port='0x16'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
     </controller>
     <controller type='pci' index='8' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='8' port='0x48'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+      <target chassis='8' port='0x17'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
     </controller>
     <controller type='pci' index='9' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='9' port='0x50'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+      <target chassis='9' port='0x18'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </controller>
     <controller type='pci' index='10' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='10' port='0x58'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
+      <target chassis='10' port='0x19'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
     </controller>
     <controller type='pci' index='11' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='11' port='0x60'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
+      <target chassis='11' port='0x1a'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
     </controller>
     <controller type='pci' index='12' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='12' port='0x68'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
+      <target chassis='12' port='0x1b'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
     </controller>
     <controller type='pci' index='13' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='13' port='0x70'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/>
+      <target chassis='13' port='0x1c'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
     </controller>
     <controller type='pci' index='14' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='14' port='0x78'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0f' function='0x0'/>
+      <target chassis='14' port='0x1d'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
     </controller>
     <filesystem type='mount' accessmode='passthrough'>
       <source dir='/export/to/guest'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie.xml
index 8e727fb..7c74b60 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie.xml
@@ -36,63 +36,63 @@
     </controller>
     <controller type='pci' index='4' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='4' port='0x18'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <target chassis='4' port='0x11'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
     </controller>
     <controller type='pci' index='5' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='5' port='0x20'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <target chassis='5' port='0x12'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
     </controller>
     <controller type='pci' index='6' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='6' port='0x28'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <target chassis='6' port='0x13'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
     </controller>
     <controller type='pci' index='7' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='7' port='0x30'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+      <target chassis='7' port='0x14'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
     </controller>
     <controller type='pci' index='8' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='8' port='0x38'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+      <target chassis='8' port='0x15'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
     </controller>
     <controller type='pci' index='9' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='9' port='0x40'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+      <target chassis='9' port='0x16'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
     </controller>
     <controller type='pci' index='10' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='10' port='0x48'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+      <target chassis='10' port='0x17'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
     </controller>
     <controller type='pci' index='11' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='11' port='0x50'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+      <target chassis='11' port='0x18'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </controller>
     <controller type='pci' index='12' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='12' port='0x58'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
+      <target chassis='12' port='0x19'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
     </controller>
     <controller type='pci' index='13' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='13' port='0x60'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
+      <target chassis='13' port='0x1a'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
     </controller>
     <controller type='pci' index='14' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='14' port='0x68'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
+      <target chassis='14' port='0x1b'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
     </controller>
     <controller type='pci' index='15' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='15' port='0x70'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/>
+      <target chassis='15' port='0x1c'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
     </controller>
     <controller type='virtio-serial' index='0'>
       <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml
index 236d955..3bbd99f 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml
@@ -50,28 +50,28 @@
     </controller>
     <controller type='pci' index='2' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='2' port='0x18'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <target chassis='2' port='0x11'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
     </controller>
     <controller type='pci' index='3' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='3' port='0x20'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <target chassis='3' port='0x12'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
     </controller>
     <controller type='pci' index='4' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='4' port='0x28'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <target chassis='4' port='0x13'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
     </controller>
     <controller type='pci' index='5' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='5' port='0x30'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+      <target chassis='5' port='0x14'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
     </controller>
     <controller type='pci' index='6' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='6' port='0x38'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+      <target chassis='6' port='0x15'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
     </controller>
     <interface type='user'>
       <mac address='52:54:00:9a:e6:c6'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virtio-pci.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virtio-pci.xml
index c4bd357..d2fa885 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virtio-pci.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virtio-pci.xml
@@ -36,63 +36,63 @@
     </controller>
     <controller type='pci' index='4' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='4' port='0x18'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+      <target chassis='4' port='0x11'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
     </controller>
     <controller type='pci' index='5' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='5' port='0x20'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+      <target chassis='5' port='0x12'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
     </controller>
     <controller type='pci' index='6' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='6' port='0x28'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
+      <target chassis='6' port='0x13'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
     </controller>
     <controller type='pci' index='7' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='7' port='0x30'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
+      <target chassis='7' port='0x14'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
     </controller>
     <controller type='pci' index='8' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='8' port='0x38'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
+      <target chassis='8' port='0x15'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
     </controller>
     <controller type='pci' index='9' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='9' port='0x40'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
+      <target chassis='9' port='0x16'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
     </controller>
     <controller type='pci' index='10' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='10' port='0x48'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
+      <target chassis='10' port='0x17'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
     </controller>
     <controller type='pci' index='11' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='11' port='0x50'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
+      <target chassis='11' port='0x18'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
     </controller>
     <controller type='pci' index='12' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='12' port='0x58'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
+      <target chassis='12' port='0x19'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
     </controller>
     <controller type='pci' index='13' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='13' port='0x60'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
+      <target chassis='13' port='0x1a'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
     </controller>
     <controller type='pci' index='14' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='14' port='0x68'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
+      <target chassis='14' port='0x1b'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
     </controller>
     <controller type='pci' index='15' model='pcie-root-port'>
       <model name='ioh3420'/>
-      <target chassis='15' port='0x70'/>
-      <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/>
+      <target chassis='15' port='0x1c'/>
+      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
     </controller>
     <controller type='virtio-serial' index='0'>
       <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 20b9b17..bd9ee77 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -849,11 +849,13 @@ mymain(void)
     DO_TEST("pcie-root-port",
             QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
             QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI,
+            QEMU_CAPS_PCI_MULTIFUNCTION,
             QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
             QEMU_CAPS_DEVICE_QXL);
     DO_TEST("pcie-switch-upstream-port",
             QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE,
             QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI,
+            QEMU_CAPS_PCI_MULTIFUNCTION,
             QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
             QEMU_CAPS_DEVICE_QXL);
     DO_TEST("pcie-switch-downstream-port",
-- 
2.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]