diff mbox

[3/3] qemu: parse: drop redundant AddImplicitControllers

Message ID e0c9755bdadd9ea5f3c301934e9af925defab8aa.1455728795.git.crobinso@redhat.com
State New
Headers show

Commit Message

Cole Robinson Feb. 17, 2016, 5:17 p.m. UTC
PostParse handles it for us now.

This causes some test suite churn; qemu's custom PostParse could is
now invoked before the generic AddImplicitControllers, so PCI
controllers end up sequentially in the XML before the generically
added IDE controllers. So it's just some XML reordering
---
 src/qemu/qemu_parse_command.c                                          | 3 ---
 tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.xml                     | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.xml                    | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-boot-network.xml                   | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.xml                | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-clock-utc.xml                      | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml                 | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.xml               | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.xml                     | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.xml          | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.xml           | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.xml    | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.xml        | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.xml       | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.xml         | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.xml         | 2 +-
 .../qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.xml | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.xml   | 2 +-
 .../qemuargv2xml-disk-drive-error-policy-wreport-rignore.xml           | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.xml            | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.xml  | 2 +-
 .../qemuargv2xml-disk-drive-network-nbd-ipv6-export.xml                | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.xml    | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.xml    | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.xml         | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml    | 2 +-
 .../qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.xml  | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.xml    | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.xml         | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.xml    | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.xml                    | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-many.xml                      | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-usb.xml                       | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.xml                    | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.xml                    | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.xml        | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.xml                   | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.xml            | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.xml              | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.xml            | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.xml               | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.xml                   | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.xml            | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.xml            | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.xml                 | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.xml                | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.xml               | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.xml                | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-migrate.xml                        | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.xml                      | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.xml                | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.xml          | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.xml                 | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.xml                 | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.xml                      | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.xml                 | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-net-eth.xml                        | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-net-user.xml                       | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-net-virtio.xml                     | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.xml                 | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-nosharepages.xml                   | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.xml                   | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.xml                   | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.xml                 | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-restore-v2.xml                     | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml                     | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml                    | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml                    | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml                     | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml              | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml                     | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml                     | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml                    | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml                      | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-smp.xml                            | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-sound.xml                          | 2 +-
 tests/qemuargv2xmldata/qemuargv2xml-watchdog.xml                       | 2 +-
 77 files changed, 76 insertions(+), 79 deletions(-)

-- 
2.5.0

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

Comments

Cole Robinson Feb. 17, 2016, 8:37 p.m. UTC | #1
On 02/17/2016 03:36 PM, Laine Stump wrote:
> On 02/17/2016 12:17 PM, Cole Robinson wrote:

>> PostParse handles it for us now.

>>

>> This causes some test suite churn; qemu's custom PostParse could is

>> now invoked before the generic AddImplicitControllers, so PCI

>> controllers end up sequentially in the XML before the generically

>> added IDE controllers. So it's just some XML reordering

>> ---

> 

> I'm curious why you did this as a separate patch from 1/3. Of course calling

> it an extra time is just a NOP so leaving them separate isn't going to make

> anything break in a bisect, but I don't see the need for it.

> 


I wanted to separate harmless test churn from
potentially-impactful-but-probably-not xen test churn

> At any rate, ACK.


Thanks, I'll push these after patch #1 is ACKd

- Cole



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

Patch

diff --git a/src/qemu/qemu_parse_command.c b/src/qemu/qemu_parse_command.c
index 077767e..60e3d69 100644
--- a/src/qemu/qemu_parse_command.c
+++ b/src/qemu/qemu_parse_command.c
@@ -2594,9 +2594,6 @@  qemuParseCommandLine(virCapsPtr caps,
 
     VIR_FREE(nics);
 
-    if (virDomainDefAddImplicitControllers(def) < 0)
-        goto error;
-
     if (virDomainDefPostParse(def, caps, VIR_DOMAIN_DEF_PARSE_ABI_UPDATE,
                               xmlopt) < 0)
         goto error;
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.xml b/tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.xml
index 31afdc5..5bcc1a7 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-boot-cdrom.xml
@@ -22,8 +22,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.xml b/tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.xml
index 13137c5..a507558 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-boot-floppy.xml
@@ -27,9 +27,9 @@ 
       <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='fdc' index='0'/>
     <controller type='ide' index='0'/>
-    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-boot-network.xml b/tests/qemuargv2xmldata/qemuargv2xml-boot-network.xml
index cc0607d..d060da6 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-boot-network.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-boot-network.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.xml b/tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.xml
index b55515a..7ffdb97 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-clock-localtime.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-clock-utc.xml b/tests/qemuargv2xmldata/qemuargv2xml-clock-utc.xml
index 23fc792..ecefafa 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-clock-utc.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-clock-utc.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml b/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml
index 7be7259..3768715 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-console-compat.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.xml
index 5b47754..aaa7e32 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom-empty.xml
@@ -27,8 +27,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.xml
index 647a4d0..146f453 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-cdrom.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.xml
index e4d78ec..2984763 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-cdrom.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.xml
index 2202eba..40ffdfc 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-boot-disk.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.xml
index 497014f..5a12671 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-directsync.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.xml
index e247651..a6215bc 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-unsafe.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.xml
index 69f3f1c..8064075 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-none.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.xml
index 95800b6..92d6250 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wb.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.xml
index d0364ba..0ce3530 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-cache-v2-wt.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.xml
index 1b9557c..59b9262 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-enospace.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.xml
index 824740d..8be911e 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-stop.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-wreport-rignore.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-wreport-rignore.xml
index ba3ee29..fade9b6 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-wreport-rignore.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-error-policy-wreport-rignore.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.xml
index d3fdab4..a904719 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-fmt-qcow.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.xml
index 36d8d73..8f50481 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-export.xml
@@ -28,8 +28,8 @@ 
       <target dev='vda' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6-export.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6-export.xml
index 04b7522..a0557e0 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6-export.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6-export.xml
@@ -28,8 +28,8 @@ 
       <target dev='vda' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.xml
index 48e9e9c..2828249 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-ipv6.xml
@@ -28,8 +28,8 @@ 
       <target dev='vda' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.xml
index 7da39e6..1a315b7 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd-unix.xml
@@ -28,8 +28,8 @@ 
       <target dev='vda' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.xml
index d7fd1fc..feae85d 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-nbd.xml
@@ -28,8 +28,8 @@ 
       <target dev='vda' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml
index 4db031b..bf82750 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-auth.xml
@@ -33,8 +33,8 @@ 
       <target dev='vda' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.xml
index 2924969..afa11ec 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ceph-env.xml
@@ -30,8 +30,8 @@ 
       <target dev='vda' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.xml
index ac023ab..7f73472 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd-ipv6.xml
@@ -31,8 +31,8 @@ 
       <target dev='vda' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.xml
index b3783db..d605aac 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-rbd.xml
@@ -55,8 +55,8 @@ 
       <target dev='vdd' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.xml
index 001b0cd..5868d5b 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-drive-network-sheepdog.xml
@@ -28,8 +28,8 @@ 
       <target dev='vda' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.xml
index 8add406..85f8b41 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-floppy.xml
@@ -33,9 +33,9 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='1'/>
     </disk>
     <controller type='usb' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='fdc' index='0'/>
     <controller type='ide' index='0'/>
-    <controller type='pci' index='0' model='pci-root'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-many.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-many.xml
index f60aba3..8ce58e3 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-many.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-many.xml
@@ -39,8 +39,8 @@ 
       <address type='drive' controller='0' bus='1' target='0' unit='1'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-usb.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-usb.xml
index 06d75aa..729c3c0 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-usb.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-usb.xml
@@ -26,8 +26,8 @@ 
       <target dev='sda' bus='usb'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.xml
index b843878..9889132 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-virtio.xml
@@ -38,8 +38,8 @@ 
       <target dev='vdb' bus='virtio'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.xml b/tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.xml
index 088daff..2fe02f9 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-disk-xenvbd.xml
@@ -38,8 +38,8 @@ 
       <target dev='xvdg' bus='xen'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.xml
index 1bac0b5..1b3ac30 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl-fullscreen.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority' fullscreen='yes'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.xml
index 5f94052..2c1c781 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-sdl.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <graphics type='sdl' display=':0.1' xauth='/root/.Xauthority'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.xml
index 46f06a8..36b8001 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-policy.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <graphics type='vnc' port='65530' autoport='no' listen='::' sharePolicy='allow-exclusive'>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.xml
index a856edc..f29bb22 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-sasl.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.xml
index 8fe4133..57e808a 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-socket.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <graphics type='vnc' socket='/tmp/foo.socket'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.xml
index a856edc..f29bb22 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc-tls.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' listen='127.0.0.1'>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.xml b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.xml
index 256c9b5..e18790f 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-graphics-vnc.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <graphics type='vnc' port='5903' autoport='no' listen='2001:1:2:3:4:5:1234:1234'>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.xml b/tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.xml
index c898523..99cc9d7 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-hostdev-pci-address.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <hostdev mode='subsystem' type='pci' managed='yes'>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.xml b/tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.xml
index a196886..ddc95d7 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-hostdev-usb-address.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <hostdev mode='subsystem' type='usb' managed='no'>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.xml b/tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.xml
index 2ff76e1..5a3a9e6 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-input-usbmouse.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='usb'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.xml b/tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.xml
index 096c082..0b9c242 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-input-usbtablet.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='tablet' bus='usb'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.xml
index 394880d..84ebc9b 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-core-off.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.xml b/tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.xml
index 26183bb..b0d7454 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-machine-core-on.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-migrate.xml b/tests/qemuargv2xmldata/qemuargv2xml-migrate.xml
index 23fc792..ecefafa 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-migrate.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-migrate.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.xml b/tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.xml
index 800a0a9..397615c 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-acpi.xml
@@ -24,8 +24,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.xml b/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.xml
index 2efe9ea..546e48f 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-s3.xml
@@ -24,8 +24,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.xml b/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.xml
index 5c77957..7ab1c73 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-disable-suspends.xml
@@ -25,8 +25,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.xml b/tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.xml
index a765cae..2bc8875 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-enable-s4.xml
@@ -24,8 +24,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.xml b/tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.xml
index 0a7299f..e14536b 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-no-reboot.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.xml b/tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.xml
index 800a0a9..397615c 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-misc-uuid.xml
@@ -24,8 +24,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.xml b/tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.xml
index 7527c60..e9c0378 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-net-eth-ifname.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <interface type='ethernet'>
       <mac address='00:11:22:33:44:55'/>
       <script path='/etc/qemu-ifup'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-net-eth.xml b/tests/qemuargv2xmldata/qemuargv2xml-net-eth.xml
index ee72830..96ad0a8 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-net-eth.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-net-eth.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <interface type='ethernet'>
       <mac address='00:11:22:33:44:55'/>
       <script path='/etc/qemu-ifup'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-net-user.xml b/tests/qemuargv2xmldata/qemuargv2xml-net-user.xml
index 17d7adc..7dd1cfe 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-net-user.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-net-user.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <interface type='user'>
       <mac address='00:11:22:33:44:55'/>
       <model type='rtl8139'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-net-virtio.xml b/tests/qemuargv2xmldata/qemuargv2xml-net-virtio.xml
index 422649c..db033eb 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-net-virtio.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-net-virtio.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <interface type='user'>
       <mac address='00:11:22:33:44:55'/>
       <model type='virtio'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.xml b/tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.xml
index 23fc792..ecefafa 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-nographics-vga.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-nosharepages.xml b/tests/qemuargv2xmldata/qemuargv2xml-nosharepages.xml
index ebb84ab..3b95c6e 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-nosharepages.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-nosharepages.xml
@@ -24,8 +24,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.xml b/tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.xml
index b2fa9f2..0bb1f3a 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-parallel-tcp.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <parallel type='tcp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <protocol type='raw'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.xml b/tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.xml
index 44c3b1d..97225f4 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-pseries-disk.xml
@@ -28,8 +28,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='2'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='scsi' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='scsi' index='0'/>
     <input type='keyboard' bus='usb'/>
     <input type='mouse' bus='usb'/>
     <graphics type='sdl'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.xml b/tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.xml
index 44c9064..98df80e 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-qemu-ns-no-env.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-restore-v2.xml b/tests/qemuargv2xmldata/qemuargv2xml-restore-v2.xml
index 23fc792..ecefafa 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-restore-v2.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-restore-v2.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml
index e44528d..b80218b 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-dev.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <serial type='dev'>
       <source path='/dev/ttyS2'/>
       <target port='0'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml
index a7596ad..90182a8 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-file.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <serial type='file'>
       <source path='/tmp/serial.log'/>
       <target port='0'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml
index 75d77ad..e8a628a 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-many.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml
index 7be7259..3768715 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-pty.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <serial type='pty'>
       <target port='0'/>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml
index 5cde307..ca625a0 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp-telnet.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <serial type='tcp'>
       <source mode='bind' host='127.0.0.1' service='9999'/>
       <protocol type='telnet'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml
index 2a43184..c747dde 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-tcp.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <serial type='tcp'>
       <source mode='connect' host='127.0.0.1' service='9999'/>
       <protocol type='raw'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml
index 61661e7..1187e2a 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-udp.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <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/qemuargv2xmldata/qemuargv2xml-serial-unix.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml
index 6789e2d..8734c75 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-unix.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <serial type='unix'>
       <source mode='connect' path='/tmp/serial.sock'/>
       <target port='0'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml b/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml
index 7cded6f..11575b7 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-serial-vc.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <serial type='vc'>
       <target port='0'/>
     </serial>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-smp.xml b/tests/qemuargv2xmldata/qemuargv2xml-smp.xml
index 9ac578b..1a4ada1 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-smp.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-smp.xml
@@ -24,8 +24,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <memballoon model='none'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-sound.xml b/tests/qemuargv2xmldata/qemuargv2xml-sound.xml
index ccffe4a..0557f61 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-sound.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-sound.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <sound model='pcspk'/>
diff --git a/tests/qemuargv2xmldata/qemuargv2xml-watchdog.xml b/tests/qemuargv2xmldata/qemuargv2xml-watchdog.xml
index aac3e72..757ac86 100644
--- a/tests/qemuargv2xmldata/qemuargv2xml-watchdog.xml
+++ b/tests/qemuargv2xmldata/qemuargv2xml-watchdog.xml
@@ -21,8 +21,8 @@ 
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
     <controller type='usb' index='0'/>
-    <controller type='ide' index='0'/>
     <controller type='pci' index='0' model='pci-root'/>
+    <controller type='ide' index='0'/>
     <input type='mouse' bus='ps2'/>
     <input type='keyboard' bus='ps2'/>
     <watchdog model='ib700' action='poweroff'/>