summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-05-14 11:16:22 +0100
committerDaniel P. Berrange <berrange@redhat.com>2012-05-15 17:07:34 +0100
commit1ebd52cb871f87b7868503b28448e96d59e41d63 (patch)
treefbe95cbc0299758e1880020690b8be3c84000558 /tests/qemuxml2xmloutdata
parentFix virDomainDeviceInfoIsSet() to check all struct fields (diff)
downloadlibvirt-1ebd52cb871f87b7868503b28448e96d59e41d63.tar.gz
libvirt-1ebd52cb871f87b7868503b28448e96d59e41d63.tar.bz2
libvirt-1ebd52cb871f87b7868503b28448e96d59e41d63.zip
Fix logic for assigning PCI addresses to USB2 companion controllers
Currently each USB2 companion controller gets put on a separate PCI slot. Not only is this wasteful of PCI slots, but it is not in compliance with the spec for USB2 controllers. The master echi1 and all companion controllers should be in the same slot, with echi1 in function 7, and uhci1-3 in functions 0-2 respectively. * src/qemu/qemu_command.c: Special case handling of USB2 controllers to apply correct pci slot assignment * tests/qemuxml2argvdata/qemuxml2argv-usb-ich9-ehci-addr.args, tests/qemuxml2argvdata/qemuxml2argv-usb-ich9-ehci-addr.xml: Expand test to cover automatic slot assignment
Diffstat (limited to 'tests/qemuxml2xmloutdata')
-rw-r--r--tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-ich9-ehci-addr.xml49
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-ich9-ehci-addr.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-ich9-ehci-addr.xml
new file mode 100644
index 000000000..e7592e995
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-usb-ich9-ehci-addr.xml
@@ -0,0 +1,49 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <controller type='usb' index='0' model='ich9-ehci1'/>
+ <controller type='usb' index='0' model='ich9-uhci1'>
+ <master startport='0'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci3'>
+ <master startport='4'/>
+ </controller>
+ <controller type='usb' index='0' model='ich9-uhci2'>
+ <master startport='2'/>
+ </controller>
+ <controller type='usb' index='1' model='ich9-ehci1'/>
+ <controller type='usb' index='1' model='ich9-uhci1'>
+ <master startport='0'/>
+ </controller>
+ <controller type='usb' index='1' model='ich9-uhci3'>
+ <master startport='4'/>
+ </controller>
+ <controller type='usb' index='1' model='ich9-uhci2'>
+ <master startport='2'/>
+ </controller>
+ <controller type='usb' index='2' model='ich9-ehci1'/>
+ <controller type='usb' index='2' model='ich9-uhci1'>
+ <master startport='0'/>
+ </controller>
+ <controller type='usb' index='2' model='ich9-uhci3'>
+ <master startport='4'/>
+ </controller>
+ <controller type='usb' index='2' model='ich9-uhci2'>
+ <master startport='2'/>
+ </controller>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>