Red Hat Bugzilla – Bug 820869
Fix automatic PCI address assignment for USB2 companion controllers
Last modified: 2012-06-20 02:58:18 EDT
Description of problem: When creating a USB2 controller, there are actually 4 devices. The primary ehci controller and 3 companion uhci controllers. The PCI address assignment code is not aware of the special requirement that these 4 devices should be configured to use just 1 slot with multi-function turned on. Version-Release number of selected component (if applicable): libvirt-0.9.10-16.el6 How reproducible: Always Steps to Reproduce: 1. Add the following XML to a guest <controller type='usb' index='0' model='ich9-ehci1'/> <controller type='usb' index='0' model='ich9-uhci1'/> <controller type='usb' index='0' model='ich9-uhci2'/> <controller type='usb' index='0' model='ich9-uhci3'/> Actual results: <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/> </controller> Expected results: <controller type='usb' index='0' model='ich9-ehci1'> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x2'/> </controller> Additional info:
First cut of patch: https://www.redhat.com/archives/libvir-list/2012-May/msg00722.html
Fix comprises the following 3 upstream commits. commit 03b804a200e214e3faf264b16f41a640c1344962 Author: Daniel P. Berrange <berrange@redhat.com> Date: Mon May 14 13:22:58 2012 +0100 Set a sensible default master start port for ehci companion controllers commit 1ebd52cb871f87b7868503b28448e96d59e41d63 Author: Daniel P. Berrange <berrange@redhat.com> Date: Mon May 14 11:16:22 2012 +0100 Fix logic for assigning PCI addresses to USB2 companion controllers commit 2c195fdbf3293792e39bc4f06755ae751025b0ea Author: Daniel P. Berrange <berrange@redhat.com> Date: Tue May 15 16:16:49 2012 +0100 Fix virDomainDeviceInfoIsSet() to check all struct fields
verify pass on qemu-kvm-0.12.1.2-2.292.el6.x86_64 kernel-2.6.32-270.el6.x86_64 libvirt-0.9.10-20.el6.x86_64 After start guest with 4 usb controller like <controller type='usb' index='0' model='ich9-ehci1'/> <controller type='usb' index='0' model='ich9-uhci1'/> <controller type='usb' index='0' model='ich9-uhci2'/> <controller type='usb' index='0' model='ich9-uhci3'/> dumpxml will show <controller type='usb' index='0' model='ich9-ehci1'> <alias name='usb0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x7'/> </controller> <controller type='usb' index='0' model='ich9-uhci1'> <alias name='usb0'/> <master startport='0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0' multifunction='on'/> </controller> <controller type='usb' index='0' model='ich9-uhci2'> <alias name='usb0'/> <master startport='2'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x1'/> </controller> <controller type='usb' index='0' model='ich9-uhci3'> <alias name='usb0'/> <master startport='4'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x2'/>
(In reply to comment #10) > verify pass on > qemu-kvm-0.12.1.2-2.292.el6.x86_64 > kernel-2.6.32-270.el6.x86_64 > libvirt-0.9.10-20.el6.x86_64 > > > After start guest with 4 usb controller like > <controller type='usb' index='0' model='ich9-ehci1'/> > <controller type='usb' index='0' model='ich9-uhci1'/> > <controller type='usb' index='0' model='ich9-uhci2'/> > <controller type='usb' index='0' model='ich9-uhci3'/> > > dumpxml will show Incomplete, it had better to log in guest then check whether these 4 controllers use just 1 slot by lspci.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2012-0748.html