Bug 1271408 - RFE: qemu: support configuring # of ports for qemu usb3 controller
Summary: RFE: qemu: support configuring # of ports for qemu usb3 controller
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-13 22:15 UTC by Cole Robinson
Modified: 2016-05-04 09:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-03 13:03:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Cole Robinson 2015-10-13 22:15:46 UTC
According to Gerd here:

https://bugzilla.redhat.com/show_bug.cgi?id=1135488#c10

qemu's xhci controller has a configurable number of ports. libvirt should support that, since the default is only 4.

Comment 1 Cole Robinson 2015-10-13 22:23:54 UTC
Gerd, is this all that's required to give the xhci controller ex. 8 ports?

  -device nec-usb-xhci,p2=8,p3=8

Also, any opinions on if we should expose p2 vs p3 or just a single 'ports' knob? I don't know what the usecase for configuring only one or the other is...

Comment 2 Gerd Hoffmann 2015-10-14 05:48:22 UTC
p2 is the number of usb2 ports, p3 is the number of usb4 ports.  Ports do overlap.  So for example p2=8,p2=4 gives you a xhci controller where ports 1-4 can do both usb2 and usb3, whereas ports 5-8 are usb2 only.

That is mostly useful for debugging/testing purposes, for example forcing devices into usb2 mode on xhci to see whenever this works correctly.

I'd suggest to expose this as a single ports= property in libvirt.

Comment 3 Cole Robinson 2016-04-27 18:30:38 UTC
Patches posted upstream: http://www.redhat.com/archives/libvir-list/2016-April/msg01829.html

Comment 4 Cole Robinson 2016-05-03 13:03:51 UTC
Upstream now:

commit 600977e293ee97fc53a7ef17fb89cb310560e7ab
Author: Cole Robinson <crobinso>
Date:   Sat Apr 23 19:52:56 2016 -0400

    qemu: support configuring usb3 controller port count
    
    This adds a ports= attribute to usb controller XML, like
    
      <controller type='usb' model='nec-xhci' ports='8'/>
    
    This maps to:
    
      qemu -device nec-usb-xhci,p2=8,p3=8
    
    Meaning, 8 ports that support both usb2 and usb3 devices. Gerd
    suggested to just expose them as one knob.


Note You need to log in before you can comment on or make changes to this bug.