From 147ebe6ddf313b8e003aef5ad87f40497fa89cb1 Mon Sep 17 00:00:00 2001 From: Laine Stump Date: Thu, 20 Oct 2016 15:46:01 -0400 Subject: [PATCH] conf: aggregate multiple pcie-root-ports onto a single slot 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 +- ...muxml2argv-aarch64-virtio-pci-default.args | 13 ++--- .../qemuxml2argv-pcie-root-port.args | 5 +- ...emuxml2argv-pcie-switch-upstream-port.args | 5 +- ...qemuxml2argv-q35-default-devices-only.args | 7 +-- .../qemuxml2argv-q35-multifunction.args | 23 ++++---- .../qemuxml2argv-q35-pcie-autoadd.args | 30 ++++++----- .../qemuxml2argv-q35-pcie.args | 28 +++++----- .../qemuxml2argv-q35-virt-manager-basic.args | 13 ++--- .../qemuxml2argv-q35-virtio-pci.args | 28 +++++----- tests/qemuxml2argvtest.c | 5 ++ ...uxml2xmlout-aarch64-virtio-pci-default.xml | 22 ++++---- .../qemuxml2xmlout-pcie-root-port.xml | 4 +- ...muxml2xmlout-pcie-switch-upstream-port.xml | 6 +-- ...emuxml2xmlout-q35-default-devices-only.xml | 10 ++-- .../qemuxml2xmlout-q35-multifunction.xml | 42 +++++++-------- .../qemuxml2xmlout-q35-pcie-autoadd.xml | 54 +++++++++---------- .../qemuxml2xmlout-q35-pcie.xml | 50 ++++++++--------- .../qemuxml2xmlout-q35-virt-manager-basic.xml | 22 ++++---- .../qemuxml2xmlout-q35-virtio-pci.xml | 50 ++++++++--------- tests/qemuxml2xmltest.c | 4 ++ 21 files changed, 222 insertions(+), 201 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 3d669f6725..e0b19a238a 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-aarch64-virtio-pci-default.args b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args index 080b02519f..46ac51d506 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-aarch64-virtio-pci-default.args @@ -21,12 +21,13 @@ 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,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=0x20,chassis=4,id=pci.4,bus=pcie.0,addr=0x4 \ --device ioh3420,port=0x28,chassis=5,id=pci.5,bus=pcie.0,addr=0x5 \ --device ioh3420,port=0x30,chassis=6,id=pci.6,bus=pcie.0,addr=0x6 \ +-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 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,\ diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.args b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port.args index 27d5164258..9a71281b3c 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 93d16b8375..10aedd5823 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 9d13466f83..30fc9b708c 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 6c4e9b211f..1b607448fb 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-q35-multifunction.args +++ b/tests/qemuxml2argvdata/qemuxml2argv-q35-multifunction.args @@ -27,16 +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,addr=0x1 \ --device ioh3420,port=0x28,chassis=9,id=pci.9,bus=pcie.0,addr=0x5 \ --device ioh3420,port=0x30,chassis=10,id=pci.10,bus=pcie.0,addr=0x6 \ --device ioh3420,port=0x38,chassis=11,id=pci.11,bus=pcie.0,addr=0x7 \ --device ioh3420,port=0x40,chassis=12,id=pci.12,bus=pcie.0,addr=0x8 \ --device ioh3420,port=0x48,chassis=13,id=pci.13,bus=pcie.0,addr=0x9 \ --device ioh3420,port=0x50,chassis=14,id=pci.14,bus=pcie.0,addr=0xa \ --device ioh3420,port=0x58,chassis=15,id=pci.15,bus=pcie.0,addr=0xb \ --device ioh3420,port=0x60,chassis=16,id=pci.16,bus=pcie.0,addr=0xc \ --device ioh3420,port=0x68,chassis=17,id=pci.17,bus=pcie.0,addr=0xd \ --device ioh3420,port=0x70,chassis=18,id=pci.18,bus=pcie.0,addr=0xe \ +-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-pcie-autoadd.args b/tests/qemuxml2argvdata/qemuxml2argv-q35-pcie-autoadd.args index ba26326e17..f3d44c0d84 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 2738749937..3b507f3e41 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 60af251461..e139e52375 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 cada05e53d..a1025dc930 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 c965e80dd5..d0b0cec7e3 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2000,6 +2000,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", @@ -2043,6 +2044,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", @@ -2176,6 +2178,7 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420); DO_TEST("aarch64-virt-2.6-virtio-pci-default", @@ -2183,6 +2186,7 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420); /* Example of using virtio-pci with no explicit PCI controller @@ -2192,6 +2196,7 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_VIRTIO_SCSI); diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml index a568f11f16..f7fbdc7a9b 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-aarch64-virtio-pci-default.xml @@ -39,32 +39,32 @@ -
+
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml index a4ff820d94..5c1ebef59b 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port.xml @@ -32,12 +32,12 @@ -
+
-
+
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml index 53e10d0c70..f35ebf7a4d 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-switch-upstream-port.xml @@ -32,12 +32,12 @@ -
+
- -
+ +
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-default-devices-only.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-default-devices-only.xml index e64b80cd88..895131a81c 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-default-devices-only.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-default-devices-only.xml @@ -24,17 +24,17 @@ -
+
- -
+ +
- -
+ +
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-multifunction.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-multifunction.xml index 7da78a55ae..14595beaa3 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-multifunction.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-multifunction.xml @@ -53,57 +53,57 @@ -
+
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie-autoadd.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie-autoadd.xml index 3742e14f7d..7a87973341 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie-autoadd.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie-autoadd.xml @@ -35,72 +35,72 @@ -
+
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie.xml index 8e727fb519..5d17e2d933 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-pcie.xml @@ -32,67 +32,67 @@ -
+
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml index 236d955112..58c10cc1fe 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virt-manager-basic.xml @@ -46,32 +46,32 @@ -
+
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virtio-pci.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virtio-pci.xml index c4bd3570c7..f1695f0b91 100644 --- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virtio-pci.xml +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-q35-virtio-pci.xml @@ -32,67 +32,67 @@ -
+
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
- -
+ +
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 50b4500f87..5040b7a819 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -850,11 +850,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", @@ -988,6 +990,7 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_VIRTIO_SCSI); @@ -996,6 +999,7 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM, QEMU_CAPS_OBJECT_GPEX, QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_VIRTIO_SCSI); -- GitLab