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

[libvirt] [PATCH v2 11/11] qemu: auto-add pci-root controller for pc machine types



<controller type='pci' index='0' model='pci-root'/>
is auto-added to pc* machine types.
Without this controller PCI bus 0 is not available and
no PCI addresses are assigned by default.

Since older libvirt supported PCI bus 0 even without
this controller, it is removed from the XML when migrating.
---
 src/conf/domain_conf.c                             |  8 ++++-
 src/qemu/qemu_command.c                            | 18 ++++++++---
 src/qemu/qemu_domain.c                             | 37 ++++++++++++++++++++++
 tests/domainsnapshotxml2xmlout/disk_snapshot.xml   |  1 +
 tests/domainsnapshotxml2xmlout/external_vm.xml     |  1 +
 tests/domainsnapshotxml2xmlout/full_domain.xml     |  1 +
 tests/domainsnapshotxml2xmlout/metadata.xml        |  1 +
 .../qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml |  1 +
 .../qemuxml2argv-blkiotune-device.xml              |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-blkiotune.xml  |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml |  1 +
 .../qemuxml2argvdata/qemuxml2argv-boot-floppy.xml  |  1 +
 .../qemuxml2argv-boot-menu-disable.xml             |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml |  1 +
 .../qemuxml2argvdata/qemuxml2argv-boot-network.xml |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml |  1 +
 .../qemuxml2argv-channel-guestfwd.xml              |  1 +
 .../qemuxml2argv-channel-virtio.xml                |  1 +
 .../qemuxml2argv-clock-localtime.xml               |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml  |  1 +
 .../qemuxml2argv-console-compat.xml                |  1 +
 .../qemuxml2argv-console-virtio-many.xml           |  1 +
 .../qemuxml2argv-controller-order.xml              |  1 +
 .../qemuxml2argv-cpu-eoi-disabled.xml              |  1 +
 .../qemuxml2argv-cpu-eoi-enabled.xml               |  1 +
 .../qemuxml2argv-cpu-host-kvmclock.xml             |  1 +
 .../qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-cputune.xml    |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml   |  1 +
 .../qemuxml2argv-disk-cdrom-empty.xml              |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml |  1 +
 .../qemuxml2argv-disk-drive-boot-cdrom.xml         |  1 +
 .../qemuxml2argv-disk-drive-boot-disk.xml          |  1 +
 .../qemuxml2argv-disk-drive-cache-directsync.xml   |  1 +
 .../qemuxml2argv-disk-drive-cache-unsafe.xml       |  1 +
 .../qemuxml2argv-disk-drive-cache-v1-none.xml      |  1 +
 .../qemuxml2argv-disk-drive-cache-v1-wb.xml        |  1 +
 .../qemuxml2argv-disk-drive-cache-v1-wt.xml        |  1 +
 .../qemuxml2argv-disk-drive-cache-v2-none.xml      |  1 +
 .../qemuxml2argv-disk-drive-cache-v2-wb.xml        |  1 +
 .../qemuxml2argv-disk-drive-cache-v2-wt.xml        |  1 +
 ...muxml2argv-disk-drive-error-policy-enospace.xml |  1 +
 .../qemuxml2argv-disk-drive-error-policy-stop.xml  |  1 +
 ...rgv-disk-drive-error-policy-wreport-rignore.xml |  1 +
 .../qemuxml2argv-disk-drive-fat.xml                |  1 +
 .../qemuxml2argv-disk-drive-fmt-qcow.xml           |  1 +
 .../qemuxml2argv-disk-drive-network-gluster.xml    |  1 +
 .../qemuxml2argv-disk-drive-network-iscsi-auth.xml |  1 +
 .../qemuxml2argv-disk-drive-network-iscsi.xml      |  1 +
 .../qemuxml2argv-disk-drive-network-nbd-export.xml |  1 +
 ...xml2argv-disk-drive-network-nbd-ipv6-export.xml |  1 +
 .../qemuxml2argv-disk-drive-network-nbd-ipv6.xml   |  1 +
 .../qemuxml2argv-disk-drive-network-nbd-unix.xml   |  1 +
 .../qemuxml2argv-disk-drive-network-nbd.xml        |  1 +
 ...emuxml2argv-disk-drive-network-rbd-ceph-env.xml |  1 +
 .../qemuxml2argv-disk-drive-network-rbd-ipv6.xml   |  1 +
 .../qemuxml2argv-disk-drive-network-rbd.xml        |  1 +
 .../qemuxml2argv-disk-drive-network-sheepdog.xml   |  1 +
 .../qemuxml2argvdata/qemuxml2argv-disk-floppy.xml  |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml  |  1 +
 .../qemuxml2argvdata/qemuxml2argv-disk-mirror.xml  |  1 +
 .../qemuxml2argv-disk-scsi-device.xml              |  1 +
 .../qemuxml2argv-disk-scsi-disk-vpd.xml            |  1 +
 ...qemuxml2argv-disk-scsi-lun-passthrough-sgio.xml |  1 +
 .../qemuxml2argv-disk-scsi-megasas.xml             |  1 +
 .../qemuxml2argv-disk-scsi-virtio-scsi.xml         |  1 +
 .../qemuxml2argv-disk-scsi-vscsi.xml               |  1 +
 .../qemuxml2argv-disk-source-pool.xml              |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml   |  1 +
 .../qemuxml2argv-disk-virtio-scsi-num_queues.xml   |  1 +
 .../qemuxml2argvdata/qemuxml2argv-disk-virtio.xml  |  1 +
 .../qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml  |  1 +
 .../qemuxml2argv-encrypted-disk.xml                |  1 +
 .../qemuxml2argvdata/qemuxml2argv-eoi-disabled.xml |  1 +
 .../qemuxml2argvdata/qemuxml2argv-eoi-enabled.xml  |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml  |  1 +
 .../qemuxml2argv-floppy-drive-fat.xml              |  1 +
 .../qemuxml2argv-graphics-listen-network.xml       |  1 +
 .../qemuxml2argv-graphics-sdl-fullscreen.xml       |  1 +
 .../qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml |  1 +
 .../qemuxml2argv-graphics-spice-compression.xml    |  1 +
 .../qemuxml2argv-graphics-spice-qxl-vga.xml        |  1 +
 .../qemuxml2argv-graphics-spice.xml                |  1 +
 .../qemuxml2argv-graphics-vnc-sasl.xml             |  1 +
 .../qemuxml2argv-graphics-vnc-socket.xml           |  1 +
 .../qemuxml2argv-graphics-vnc-tls.xml              |  1 +
 .../qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml |  1 +
 .../qemuxml2argv-hostdev-pci-address.xml           |  1 +
 .../qemuxml2argv-hostdev-usb-address.xml           |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml  |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-hyperv.xml     |  1 +
 .../qemuxml2argv-input-usbmouse.xml                |  1 +
 .../qemuxml2argv-input-usbtablet.xml               |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml   |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-lease.xml      |  1 +
 .../qemuxml2argv-machine-core-off.xml              |  1 +
 .../qemuxml2argv-machine-core-on.xml               |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-migrate.xml    |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-minimal.xml    |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml  |  1 +
 .../qemuxml2argv-misc-disable-s3.xml               |  1 +
 .../qemuxml2argv-misc-disable-suspends.xml         |  1 +
 .../qemuxml2argv-misc-enable-s4.xml                |  1 +
 .../qemuxml2argv-misc-no-reboot.xml                |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml  |  1 +
 .../qemuxml2argv-net-bandwidth.xml                 |  1 +
 .../qemuxml2argv-net-eth-ifname.xml                |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml    |  1 +
 .../qemuxml2argvdata/qemuxml2argv-net-hostdev.xml  |  1 +
 .../qemuxml2argv-net-openvswitch.xml               |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-net-user.xml   |  1 +
 .../qemuxml2argv-net-virtio-device.xml             |  1 +
 .../qemuxml2argv-net-virtio-network-portgroup.xml  |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml |  1 +
 .../qemuxml2argv-nographics-vga.xml                |  1 +
 .../qemuxml2argv-numad-static-vcpu-no-numatune.xml |  1 +
 .../qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-pci-rom.xml    |  1 +
 .../qemuxml2argv-qemu-ns-no-env.xml                |  1 +
 .../qemuxml2argv-reboot-timeout-disabled.xml       |  1 +
 .../qemuxml2argv-reboot-timeout-enabled.xml        |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml |  1 +
 .../qemuxml2argv-seclabel-dynamic-baselabel.xml    |  1 +
 .../qemuxml2argv-seclabel-dynamic-override.xml     |  1 +
 .../qemuxml2argv-seclabel-none.xml                 |  1 +
 .../qemuxml2argv-seclabel-static.xml               |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml |  1 +
 .../qemuxml2argvdata/qemuxml2argv-serial-file.xml  |  1 +
 .../qemuxml2argvdata/qemuxml2argv-serial-many.xml  |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml |  1 +
 .../qemuxml2argv-serial-tcp-telnet.xml             |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml |  1 +
 .../qemuxml2argvdata/qemuxml2argv-serial-unix.xml  |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml  |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-smp.xml        |  1 +
 .../qemuxml2argvdata/qemuxml2argv-sound-device.xml |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-sound.xml      |  1 +
 .../qemuxml2argv-tpm-passthrough.xml               |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-usb-redir.xml  |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml |  1 +
 .../qemuxml2argv-virtio-rng-egd.xml                |  1 +
 .../qemuxml2argv-virtio-rng-random.xml             |  1 +
 tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml   |  1 +
 .../qemuxml2xmlout-balloon-device-auto.xml         |  1 +
 .../qemuxml2xmlout-channel-virtio-auto.xml         |  1 +
 .../qemuxml2xmlout-console-compat-auto.xml         |  1 +
 .../qemuxml2xmlout-console-virtio.xml              |  1 +
 .../qemuxml2xmlout-disk-mirror.xml                 |  1 +
 .../qemuxml2xmlout-disk-scsi-device-auto.xml       |  1 +
 .../qemuxml2xmlout-graphics-listen-network2.xml    |  1 +
 .../qemuxml2xmlout-graphics-spice-timeout.xml      |  1 +
 .../qemuxml2xmloutdata/qemuxml2xmlout-memtune.xml  |  1 +
 .../qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml |  1 +
 ...emuxml2xmlout-numad-auto-memory-vcpu-cpuset.xml |  1 +
 ...ad-auto-memory-vcpu-no-cpuset-and-placement.xml |  1 +
 .../qemuxml2xmlout-numad-auto-vcpu-no-numatune.xml |  1 +
 .../qemuxml2xmlout-serial-target-port-auto.xml     |  1 +
 .../qemuxml2xmlout-usb-ich9-ehci-addr.xml          |  1 +
 160 files changed, 215 insertions(+), 5 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 68518a7..a2179aa 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10849,9 +10849,15 @@ virDomainDefParseXML(xmlDocPtr xml,
 
     if (def->virtType == VIR_DOMAIN_VIRT_QEMU ||
         def->virtType == VIR_DOMAIN_VIRT_KQEMU ||
-        def->virtType == VIR_DOMAIN_VIRT_KVM)
+        def->virtType == VIR_DOMAIN_VIRT_KVM) {
         if (virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_USB, 0, -1) < 0)
             goto error;
+        if (STRPREFIX(def->os.machine,"pc")) {
+            if (virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 0,
+                                               VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT) < 0)
+                goto error;
+        }
+    }
 
     /* analysis of the resource leases */
     if ((n = virXPathNodeSet("./devices/lease", ctxt, &nodes)) < 0) {
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index df0077a..21da6b6 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1209,6 +1209,10 @@ struct _qemuDomainPCIAddressSet {
 static bool qemuPCIAddressValidate(qemuDomainPCIAddressSetPtr addrs ATTRIBUTE_UNUSED,
                                    virDevicePCIAddressPtr addr)
 {
+    if (addrs->nbuses == 0) {
+        virReportError(VIR_ERR_XML_ERROR, "%s", _("No PCI buses available"));
+        return false;
+    }
     if (addr->domain != 0) {
         virReportError(VIR_ERR_XML_ERROR, "%s",
                        _("Only PCI domain 0 is available"));
@@ -1363,15 +1367,15 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
     qemuDomainObjPrivatePtr priv = NULL;
 
     if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) {
-        int nbuses = 1;
+        int nbuses = 0;
         int i;
         int rv;
 
         for (i = 0; i < def->ncontrollers; i++) {
-            if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI &&
-                def->controllers[i]->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE)
+            if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI)
                 nbuses++;
         }
+
         if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCI_BRIDGE)) {
             virDomainDeviceInfo info;
             /* 1st pass to figure out how many PCI bridges we need */
@@ -1398,7 +1402,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
         if (!(addrs = qemuDomainPCIAddressSetCreate(def, addrs->nbuses, false)))
             goto cleanup;
 
-        if (qemuAssignDevicePCISlots(def, qemuCaps, addrs) < 0)
+        if (nbuses && qemuAssignDevicePCISlots(def, qemuCaps, addrs) < 0)
             goto cleanup;
     }
 
@@ -10146,6 +10150,12 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
     if (virDomainDefAddImplicitControllers(def) < 0)
         goto error;
 
+    if (STRPREFIX(def->os.machine,"pc")) {
+        if (virDomainDefMaybeAddController(def, VIR_DOMAIN_CONTROLLER_TYPE_PCI, 0,
+                                           VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT) < 0)
+            goto error;
+    }
+
     if (cmd->num_args || cmd->num_env) {
         def->ns = *virDomainXMLOptionGetNamespace(xmlopt);
         def->namespaceData = cmd;
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index a7aabdf..9d6db05 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -1255,6 +1255,7 @@ qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
 
     if ((flags & VIR_DOMAIN_XML_MIGRATABLE)) {
         int i;
+        int idx = -1;
         virDomainControllerDefPtr usb = NULL;
 
         /* If only the default USB controller is present, we can remove it
@@ -1288,6 +1289,42 @@ qemuDomainDefFormatBuf(virQEMUDriverPtr driver,
                     def->controllers[def->ncontrollers++] = controllers[i];
             }
         }
+
+        /* Remove the default PCI controller if there is only one present
+         * and its model is pci-root */
+        for (i = 0; i < def->ncontrollers; i++) {
+            if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI) {
+                if (idx >= 0) {
+                    idx = -1;
+                    break;
+                }
+                idx = i;
+            }
+        }
+        if (idx >= 0 && def->controllers[idx]->model == VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT) {
+            VIR_DEBUG("Removing default 'pci-root' from domain '%s'"
+                      " for migration compatibility", def->name);
+            if (usb) {
+                if (VIR_DELETE_ELEMENT(def->controllers, idx, def->ncontrollers) < 0) {
+                    virReportOOMError();
+                    goto cleanup;
+                }
+            } else {
+                controllers = def->controllers;
+                ncontrollers = def->ncontrollers;
+                if (VIR_ALLOC_N(def->controllers, ncontrollers - 1) < 0) {
+                    controllers = NULL;
+                    virReportOOMError();
+                    goto cleanup;
+                }
+
+                def->ncontrollers = 0;
+                for (i = 0; i < ncontrollers; i++) {
+                    if (i != idx)
+                        def->controllers[def->ncontrollers++] = controllers[i];
+                }
+            }
+        }
     }
 
     ret = virDomainDefFormatInternal(def, flags, buf);
diff --git a/tests/domainsnapshotxml2xmlout/disk_snapshot.xml b/tests/domainsnapshotxml2xmlout/disk_snapshot.xml
index 57aef16..5f42bf5 100644
--- a/tests/domainsnapshotxml2xmlout/disk_snapshot.xml
+++ b/tests/domainsnapshotxml2xmlout/disk_snapshot.xml
@@ -72,6 +72,7 @@
       </disk>
       <controller type='usb' index='0'/>
       <controller type='ide' index='0'/>
+      <controller type='pci' index='0' model='pci-root'/>
       <memballoon model='virtio'/>
     </devices>
   </domain>
diff --git a/tests/domainsnapshotxml2xmlout/external_vm.xml b/tests/domainsnapshotxml2xmlout/external_vm.xml
index 8814bce..5a87ba6 100644
--- a/tests/domainsnapshotxml2xmlout/external_vm.xml
+++ b/tests/domainsnapshotxml2xmlout/external_vm.xml
@@ -37,6 +37,7 @@
       </disk>
       <controller type='usb' index='0'/>
       <controller type='ide' index='0'/>
+      <controller type='pci' index='0' model='pci-root'/>
       <memballoon model='virtio'/>
     </devices>
   </domain>
diff --git a/tests/domainsnapshotxml2xmlout/full_domain.xml b/tests/domainsnapshotxml2xmlout/full_domain.xml
index 65d1469..3a9e24d 100644
--- a/tests/domainsnapshotxml2xmlout/full_domain.xml
+++ b/tests/domainsnapshotxml2xmlout/full_domain.xml
@@ -30,6 +30,7 @@
       </disk>
       <controller type='usb' index='0'/>
       <controller type='ide' index='0'/>
+      <controller type='pci' index='0' model='pci-root'/>
       <memballoon model='virtio'/>
     </devices>
   </domain>
diff --git a/tests/domainsnapshotxml2xmlout/metadata.xml b/tests/domainsnapshotxml2xmlout/metadata.xml
index f961458..b385141 100644
--- a/tests/domainsnapshotxml2xmlout/metadata.xml
+++ b/tests/domainsnapshotxml2xmlout/metadata.xml
@@ -34,6 +34,7 @@
       </disk>
       <controller type='usb' index='0'/>
       <controller type='ide' index='0'/>
+      <controller type='pci' index='0' model='pci-root'/>
       <memballoon model='virtio'/>
     </devices>
   </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml b/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml
index 0f48917..5d61b72 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml
@@ -37,6 +37,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-blkiotune-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-blkiotune-device.xml
index f21e68a..743cf29 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-blkiotune-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-blkiotune-device.xml
@@ -32,6 +32,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-blkiotune.xml b/tests/qemuxml2argvdata/qemuxml2argv-blkiotune.xml
index a0445bb..87c6e50 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-blkiotune.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-blkiotune.xml
@@ -24,6 +24,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
index 6cb941d..183a8c7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-cdrom.xml
@@ -22,6 +22,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
index 5c50e09..6afc8e3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-floppy.xml
@@ -27,6 +27,7 @@
     <controller type='usb' index='0'/>
     <controller type='fdc' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml
index 38df8fe..62f562d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable.xml
@@ -23,6 +23,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml
index 0cd2a1b..bfae80e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-multi.xml
@@ -26,6 +26,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
index 0d29608..6147399 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-network.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml
index 3ac8517..c54ee52 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-boot-order.xml
@@ -43,6 +43,7 @@
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
     <controller type='fdc' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='user'>
       <mac address='00:11:22:33:44:55'/>
       <model type='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
index 60e853c..2aea70a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-guestfwd.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <channel type='pipe'>
       <source path='/tmp/guestfwd'/>
       <target type='guestfwd' address='10.0.2.1' port='4600'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
index a280842..0d15ed5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml
@@ -24,6 +24,7 @@
     <controller type='virtio-serial' index='1'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
     </controller>
+    <controller type='pci' index='0' model='pci-root'/>
     <channel type='pty'>
       <target type='virtio' name='org.linux-kvm.port.foo'/>
       <address type='virtio-serial' controller='1' bus='0' port='3'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
index 96058f1..77978bb 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-localtime.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
index c4d483a..6aed326 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-clock-utc.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
index e3821cd..1eca2a9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-compat.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.xml
index 6028a2c..6d5a917 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-console-virtio-many.xml
@@ -22,6 +22,7 @@
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
     <controller type='virtio-serial' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-controller-order.xml b/tests/qemuxml2argvdata/qemuxml2argv-controller-order.xml
index 6a98eaa..a31dbbd 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-controller-order.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-controller-order.xml
@@ -46,6 +46,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
     </controller>
     <controller type='ccid' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='user'>
       <mac address='52:54:00:4d:4b:19'/>
       <model type='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-eoi-disabled.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-eoi-disabled.xml
index 5e5bc04..ed6a2eb 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-eoi-disabled.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-eoi-disabled.xml
@@ -23,6 +23,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-eoi-enabled.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-eoi-enabled.xml
index ecc542e..dc43def 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-eoi-enabled.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-eoi-enabled.xml
@@ -23,6 +23,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.xml
index 16d71a3..89153a5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-host-kvmclock.xml
@@ -19,6 +19,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml b/tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml
index 0bbe8e0..7d66eb0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cpu-kvmclock.xml
@@ -20,6 +20,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml b/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml
index 593e650..813d201 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-cputune.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
index 1f43938..ce4ef93 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-aio.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
index f885be1..6d6d096 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.xml
@@ -26,6 +26,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
index e8c9949..8d6ba70 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom.xml
@@ -27,6 +27,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
index 532dbc4..9d8f02d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-cdrom.xml
@@ -26,6 +26,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
index 016afad..b71505a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-boot-disk.xml
@@ -26,6 +26,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml
index 55e84fb..0b85fb1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-directsync.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml
index d56dab6..4bd8e24 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-unsafe.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
index 82ba249..7fe9082 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-none.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
index 7c16352..f0e7df4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wb.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
index 9358e19..5e0896a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v1-wt.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
index 69e9c24..0beda48 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-none.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
index 6915798..00730f7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wb.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
index 4c6b2b3..6ee75aa 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-cache-v2-wt.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
index d7cf3d0..92fcd8a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-enospace.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
index ae85d04..83d5dd0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-stop.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml
index db0391a..ded9cd1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-error-policy-wreport-rignore.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
index ecdc2ed..9cfa44f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml
@@ -23,6 +23,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
index 38cb230..85fe2a9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fmt-qcow.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml
index e509b1b..7c1fdb1 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-gluster.xml
@@ -29,6 +29,7 @@
       <target dev='vdb' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.xml
index acaa503..ee87bdf 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi-auth.xml
@@ -26,6 +26,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.xml
index 7db3426..a6b13ab 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-iscsi.xml
@@ -29,6 +29,7 @@
       <target dev='vdb' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-export.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-export.xml
index 7a84604..dd52c39 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-export.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-export.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6-export.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6-export.xml
index c063db8..c3bfa34 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6-export.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6-export.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6.xml
index 540aa02..8087f90 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-ipv6.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-unix.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-unix.xml
index a4126f5..0955fee 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-unix.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-unix.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
index 36301a9..e74b95f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml
index 8309cae..64a6ebb 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ceph-env.xml
@@ -30,6 +30,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ipv6.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ipv6.xml
index be4edbf..06e852d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ipv6.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd-ipv6.xml
@@ -32,6 +32,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
index 081f9a6..bba512e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-rbd.xml
@@ -31,6 +31,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
index ac89dd7..d20ca3e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-sheepdog.xml
@@ -29,6 +29,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
index c0c6629..b229c79 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-floppy.xml
@@ -32,6 +32,7 @@
     <controller type='usb' index='0'/>
     <controller type='fdc' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
index ba044d1..52ac285 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-many.xml
@@ -36,6 +36,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml
index bec18f2..aa16a7e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-mirror.xml
@@ -37,6 +37,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml
index 1285811..d3d8892 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-device.xml
@@ -27,6 +27,7 @@
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
     <controller type='scsi' index='0' model='lsilogic'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml
index 96786e3..a0e1105 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-vpd.xml
@@ -33,6 +33,7 @@
     <controller type='usb' index='0'/>
     <controller type='scsi' index='0' model='virtio-scsi'/>
     <controller type='scsi' index='1' model='lsilogic'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-lun-passthrough-sgio.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-lun-passthrough-sgio.xml
index eecf609..7cf57ec 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-lun-passthrough-sgio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-lun-passthrough-sgio.xml
@@ -27,6 +27,7 @@
     <controller type='scsi' index='0' model='virtio-scsi'/>
     <controller type='scsi' index='1' model='lsilogic'/>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-megasas.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-megasas.xml
index 9a496ae..801207d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-megasas.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-megasas.xml
@@ -27,6 +27,7 @@
     <controller type='ide' index='0'/>
     <controller type='scsi' index='0' model='lsisas1078'/>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-virtio-scsi.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-virtio-scsi.xml
index 1cb5cb2..2d8df2f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-virtio-scsi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-virtio-scsi.xml
@@ -27,6 +27,7 @@
     <controller type='ide' index='0'/>
     <controller type='scsi' index='0' model='virtio-scsi'/>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.xml
index d9ca230..a175b2d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-vscsi.xml
@@ -27,6 +27,7 @@
     <controller type='ide' index='0'/>
     <controller type='scsi' index='0' model='ibmvscsi'/>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml
index acf9753..465a539 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml
@@ -32,6 +32,7 @@
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
     <controller type='ide' index='1'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
index d401d7d..6cf06a0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-usb.xml
@@ -25,6 +25,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.xml
index dfa9cf1..0b0b656 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-num_queues.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='scsi' index='0' model='virtio-scsi' num_queues='8'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
index 29f406e..b3d8c59 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-virtio.xml
@@ -35,6 +35,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
index 0795fe3..73e8ffa 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-xenvbd.xml
@@ -35,6 +35,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml b/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml
index edea441..60fecb8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-encrypted-disk.xml
@@ -24,6 +24,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
     </disk>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-eoi-disabled.xml b/tests/qemuxml2argvdata/qemuxml2argv-eoi-disabled.xml
index 3173a41..10a8843 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-eoi-disabled.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-eoi-disabled.xml
@@ -20,6 +20,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-eoi-enabled.xml b/tests/qemuxml2argvdata/qemuxml2argv-eoi-enabled.xml
index 22f0803..5d1e9dc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-eoi-enabled.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-eoi-enabled.xml
@@ -20,6 +20,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml
index 22e388f..b3b7e89 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml
@@ -34,6 +34,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
     </controller>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='user'>
       <mac address='52:54:00:e5:48:58'/>
       <model type='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml b/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
index 0c8ae45..360a7fd 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
@@ -24,6 +24,7 @@
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
     <controller type='fdc' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml
index d17bda8..b005440 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-listen-network.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no'>
       <listen type='network' network='Bobsnetwork'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
index d0e9d77..da17b88 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl-fullscreen.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority' fullscreen='yes'/>
     <video>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
index f3cdf69..7172fb0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority'/>
     <video>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml
index a8c4ad8..5da94c2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'>
       <listen type='address' address='127.0.0.1'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
index 563d371..99d2996 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1'>
       <listen type='address' address='127.0.0.1'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
index 9a36660..b22fbcc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='spice' port='5903' tlsPort='5904' autoport='no' listen='127.0.0.1' defaultMode='secure'>
       <listen type='address' address='127.0.0.1'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
index 70a7ce3..fa0ea2c 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-sasl.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'>
       <listen type='address' address='127.0.0.1'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
index 8ef7d05..bd026b3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-socket.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' socket='/tmp/foo.socket'/>
     <video>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
index 70a7ce3..fa0ea2c 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc-tls.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'>
       <listen type='address' address='127.0.0.1'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
index 663b547..6608054 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' listen='2001:1:2:3:4:5:1234:1234'>
       <listen type='address' address='2001:1:2:3:4:5:1234:1234'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
index 3c69f83..8f46aca 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <hostdev mode='subsystem' type='pci' managed='yes'>
       <source>
         <address domain='0x0000' bus='0x06' slot='0x12' function='0x5'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
index 811e987..ad83474 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <hostdev mode='subsystem' type='usb' managed='no'>
       <source>
         <address bus='14' device='6'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml b/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
index b5a9816..0822b57 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hugepages.xml
@@ -24,6 +24,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hyperv.xml b/tests/qemuxml2argvdata/qemuxml2argv-hyperv.xml
index 9b7d8f2..0d5d0c7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-hyperv.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-hyperv.xml
@@ -21,6 +21,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
index 6548c30..72aad83 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbmouse.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='usb'/>
     <memballoon model='virtio'/>
   </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
index 345bdb3..2d84ccb 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-input-usbtablet.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='tablet' bus='usb'/>
     <memballoon model='virtio'/>
   </devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml b/tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml
index 8abcb51..a187aaa 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-kvmclock.xml
@@ -20,6 +20,7 @@
   <devices>
     <emulator>/usr/bin/kvm</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-lease.xml b/tests/qemuxml2argvdata/qemuxml2argv-lease.xml
index a9b311d..564f0b4 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-lease.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-lease.xml
@@ -27,6 +27,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <lease>
       <lockspace>somearea</lockspace>
       <key>thequickbrownfoxjumpedoverthelazydog</key>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-core-off.xml b/tests/qemuxml2argvdata/qemuxml2argv-machine-core-off.xml
index 5ef3da0..8fef50f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-machine-core-off.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-core-off.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-machine-core-on.xml b/tests/qemuxml2argvdata/qemuxml2argv-machine-core-on.xml
index b2cfe23..e504bbf 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-machine-core-on.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-machine-core-on.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml b/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
index 961e5af..1d29fa7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-migrate.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml b/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
index 26fdf0d..4a938b3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-minimal.xml
@@ -26,6 +26,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
index 9c8e5dd..dbdc7dd 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-acpi.xml
@@ -24,6 +24,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-s3.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-s3.xml
index b89327d..91eea1a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-s3.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-s3.xml
@@ -24,6 +24,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-suspends.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-suspends.xml
index fe0cf99..3c79918 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-suspends.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-disable-suspends.xml
@@ -25,6 +25,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-enable-s4.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-enable-s4.xml
index fd65832..a2d7c59 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-enable-s4.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-enable-s4.xml
@@ -24,6 +24,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
index 72d4bfb..b1939c7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-no-reboot.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml b/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
index 9c8e5dd..dbdc7dd 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.xml
@@ -24,6 +24,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml
index 885e854..4b8646d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-bandwidth.xml
@@ -41,6 +41,7 @@
     <controller type='virtio-serial' index='0'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
     </controller>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='network'>
       <mac address='52:54:00:24:a5:9f'/>
       <source network='default'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
index b150371..f4f2265 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth-ifname.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='ethernet'>
       <mac address='00:11:22:33:44:55'/>
       <script path='/etc/qemu-ifup'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
index eca5da5..1f27db3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-eth.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='ethernet'>
       <mac address='00:11:22:33:44:55'/>
       <script path='/etc/qemu-ifup'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-hostdev.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-hostdev.xml
index 9be0d2d..d65ef87 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-hostdev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-hostdev.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='hostdev' managed='yes'>
       <mac address='00:11:22:33:44:55'/>
       <source>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-openvswitch.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-openvswitch.xml
index 9c2c5dc..e90de23 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-openvswitch.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-openvswitch.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='network'>
       <mac address='00:11:22:33:44:55'/>
       <source network='ovs-net'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
index fe3a271..2b5613d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-user.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='user'>
       <mac address='00:11:22:33:44:55'/>
       <model type='rtl8139'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml
index 9b37f2f..1782831 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='user'>
       <mac address='00:11:22:33:44:55'/>
       <model type='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-network-portgroup.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-network-portgroup.xml
index 0fb9b2c..950a9db 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-network-portgroup.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio-network-portgroup.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='network'>
       <mac address='00:11:22:33:44:55'/>
       <source network='rednet' portgroup='bob'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
index ff7ea01..d38c367 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-net-virtio.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='user'>
       <mac address='00:11:22:33:44:55'/>
       <model type='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml b/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
index 961e5af..1d29fa7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-nographics-vga.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-numad-static-vcpu-no-numatune.xml b/tests/qemuxml2argvdata/qemuxml2argv-numad-static-vcpu-no-numatune.xml
index 71c1497..6e9720f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-numad-static-vcpu-no-numatune.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-numad-static-vcpu-no-numatune.xml
@@ -24,6 +24,7 @@
     </disk>
     <controller type='ide' index='0'/>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
index 23f1064..52503fe 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-parallel-tcp.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <parallel type='tcp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <protocol type='raw'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pci-rom.xml b/tests/qemuxml2argvdata/qemuxml2argv-pci-rom.xml
index 371835d..a5e59b2 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-pci-rom.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-pci-rom.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='user'>
       <mac address='52:54:00:24:a5:9f'/>
       <model type='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
index 826ea30..6c94798 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-qemu-ns-no-env.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
   <qemu:commandline>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.xml b/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.xml
index 38a0f52..883a804 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-disabled.xml
@@ -16,6 +16,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.xml b/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.xml
index 3a9cd6f..a298b9d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-reboot-timeout-enabled.xml
@@ -16,6 +16,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
index c4d483a..6aed326 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v1.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
index 961e5af..1d29fa7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-restore-v2.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-baselabel.xml b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-baselabel.xml
index 98362a7..a80e781 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-baselabel.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-baselabel.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
   <seclabel type='dynamic' model='selinux' relabel='yes'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml
index 426b663..b790d07 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-override.xml
@@ -33,6 +33,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
   <seclabel type='dynamic' model='selinux' relabel='yes'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml
index 1a6878c..cbeae50 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-none.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
   <seclabel type='none'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-static.xml b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-static.xml
index 31d5f58..c1e4392 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-static.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-static.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
   <seclabel type='static' model='selinux' relabel='no'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
index 61e382c..80c5809 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-dev.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='dev'>
       <source path='/dev/ttyS2'/>
       <target port='0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
index c6780aa..d363df5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-file.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='file'>
       <source path='/tmp/serial.log'/>
       <target port='0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
index 98bbb56..79e173f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-many.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
index 5d03125..d0ba5ef 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-pty.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
index cbd5bdc..dd51486 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp-telnet.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='tcp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <protocol type='telnet'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
index 082b99b..4f597b5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-tcp.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='tcp'>
       <source mode='connect' host='127.0.0.1' service='9999'/>
       <protocol type='raw'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
index 0ff161d..c21e13a 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-udp.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='udp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <source mode='connect' host='127.0.0.1' service='9998'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
index 425b442..dd326d0 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-unix.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='unix'>
       <source mode='connect' path='/tmp/serial.sock'/>
       <target port='0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
index 7a72a9f..a80e917 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-serial-vc.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='vc'>
       <target port='0'/>
     </serial>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-smp.xml b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
index 6a48c2e..d53cf44 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-smp.xml
@@ -24,6 +24,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
index c588a24..7bf9ff9 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <sound model='pcspk'/>
     <sound model='es1370'/>
     <sound model='sb16'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
index ac78502..9f74394 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <sound model='pcspk'/>
     <sound model='es1370'/>
     <sound model='sb16'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.xml b/tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.xml
index c7656b6..05b991f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-tpm-passthrough.xml
@@ -19,6 +19,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <tpm model='tpm-tis'>
       <backend type='passthrough'>
         <device path='/dev/tpm0'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-usb-redir.xml b/tests/qemuxml2argvdata/qemuxml2argv-usb-redir.xml
index 1b8b7ed..1ea66f5 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-usb-redir.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-redir.xml
@@ -29,6 +29,7 @@
       <master startport='4'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x2'/>
     </controller>
+    <controller type='pci' index='0' model='pci-root'/>
     <redirdev bus='usb' type='tcp'>
       <source mode='connect' host='localhost' service='4000'/>
       <protocol type='raw'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml
index c4f0079..077ca92 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-lun.xml
@@ -33,6 +33,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
     </controller>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='user'>
       <mac address='52:54:00:e5:48:58'/>
       <model type='virtio'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.xml b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.xml
index 4e52a32..c44dc7d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-egd.xml
@@ -15,6 +15,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
     <rng model='virtio'>
       <backend model='egd' type='tcp'>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml
index 354ae42..fc2be1e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-random.xml
@@ -15,6 +15,7 @@
   <devices>
     <emulator>/usr/bin/qemu</emulator>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
     <rng model='virtio'>
       <rate bytes='123' period='1234'/>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml b/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
index 4de94ec..29ea489 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-watchdog.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <watchdog model='ib700' action='poweroff'/>
     <memballoon model='virtio'/>
   </devices>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml
index c4d483a..380b70f 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-balloon-device-auto.xml
@@ -20,6 +20,7 @@
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='ide' index='0'/>
     <memballoon model='virtio'/>
   </devices>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
index c257292..fd6b852 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-channel-virtio-auto.xml
@@ -25,6 +25,7 @@
     <controller type='virtio-serial' index='1'>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
     </controller>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='virtio-serial' index='2'/>
     <channel type='pty'>
       <target type='virtio' name='org.linux-kvm.port.0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
index e3821cd..1eca2a9 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-compat-auto.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
index 031f821..340430e 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-console-virtio.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='virtio-serial' index='0'/>
     <console type='pty'>
       <target type='virtio' port='0'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror.xml
index 29f406e..b3d8c59 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-mirror.xml
@@ -35,6 +35,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml
index 26e5547..5ec1e94 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-scsi-device-auto.xml
@@ -26,6 +26,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='scsi' index='0'/>
     <memballoon model='virtio'/>
   </devices>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
index fae1e6f..3f7c383 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-listen-network2.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <graphics type='vnc' port='-1' autoport='yes' listen='1.2.3.4'>
       <listen type='address' address='1.2.3.4'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
index 54b68fa..f793f62 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-graphics-spice-timeout.xml
@@ -59,6 +59,7 @@
       <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
     </controller>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='ethernet'>
       <mac address='52:54:00:71:70:89'/>
       <script path='/etc/qemu-ifup'/>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-memtune.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-memtune.xml
index 34ec18f..92dcacf 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-memtune.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-memtune.xml
@@ -26,6 +26,7 @@
     </disk>
     <controller type='usb' index='0'/>
     <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml
index c3a55cf..e32fb67 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-metadata.xml
@@ -25,6 +25,7 @@
     </disk>
     <controller type='ide' index='0'/>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-auto-memory-vcpu-cpuset.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-auto-memory-vcpu-cpuset.xml
index ffca2a9..a5fef3d 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-auto-memory-vcpu-cpuset.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-auto-memory-vcpu-cpuset.xml
@@ -27,6 +27,7 @@
     </disk>
     <controller type='ide' index='0'/>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-auto-memory-vcpu-no-cpuset-and-placement.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-auto-memory-vcpu-no-cpuset-and-placement.xml
index 28ec59f..97aa619 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-auto-memory-vcpu-no-cpuset-and-placement.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-auto-memory-vcpu-no-cpuset-and-placement.xml
@@ -27,6 +27,7 @@
     </disk>
     <controller type='ide' index='0'/>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-auto-vcpu-no-numatune.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-auto-vcpu-no-numatune.xml
index 26de1b2..8fa7a05 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-auto-vcpu-no-numatune.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-numad-auto-vcpu-no-numatune.xml
@@ -27,6 +27,7 @@
     </disk>
     <controller type='ide' index='0'/>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml
index 430d131..2254851 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-serial-target-port-auto.xml
@@ -21,6 +21,7 @@
     </disk>
     <controller type='ide' index='0'/>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-ich9-ehci-addr.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-ich9-ehci-addr.xml
index e7592e9..8119564 100644
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-ich9-ehci-addr.xml
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-ich9-ehci-addr.xml
@@ -44,6 +44,7 @@
     <controller type='usb' index='2' model='ich9-uhci2'>
       <master startport='2'/>
     </controller>
+    <controller type='pci' index='0' model='pci-root'/>
     <memballoon model='virtio'/>
   </devices>
 </domain>
-- 
1.8.1.5


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