[libvirt] [PATCH] Fix logic for assigning PCI addresses to USB2 companion controllers
Eric Blake
eblake at redhat.com
Mon May 14 21:55:50 UTC 2012
On 05/14/2012 04:19 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
>
> 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
> ---
> src/qemu/qemu_command.c | 107 ++++++++++++++++----
> .../qemuxml2argv-usb-ich9-ehci-addr.args | 15 ++-
> .../qemuxml2argv-usb-ich9-ehci-addr.xml | 37 ++++++-
> 3 files changed, 138 insertions(+), 21 deletions(-)
>
> +++ b/tests/qemuxml2argvdata/qemuxml2argv-usb-ich9-ehci-addr.xml
> @@ -10,8 +10,43 @@
> </os>
> <devices>
> <emulator>/usr/bin/qemu</emulator>
> + <!-- Intentionally mixed up ordering to check we assign
> + addresses to the correct matching companions -->
> <controller type='usb' index='0' model='ich9-ehci1'>
> - <address type='pci' domain='0' bus='0' slot='4' function='7'/>
> + </controller>
Can we also add a matching file in qemuxml2xmloutdata/ to ensure that
qemuxml2xmltest converts the mixed up input into consistent output?
Other than that, ACK.
--
Eric Blake eblake at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120514/f1888367/attachment-0001.sig>
More information about the libvir-list
mailing list