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.

https://bugzilla.redhat.com/show_bug.cgi?id=1271408
This commit is contained in:
Cole Robinson
2016-04-23 19:52:56 -04:00
parent 48e12de51e
commit 600977e293
8 changed files with 105 additions and 16 deletions

View File

@@ -3028,8 +3028,10 @@
<span class="since">since 0.10.0</span>, if the USB bus needs to be
explicitly disabled for the guest, <code>model='none'</code> may be
used. <span class="since">Since 1.0.5</span>, no default USB controller
will be built on S390. The PowerPC64 "spapr-vio" addresses do not have an
associated controller.
will be built on S390. <span class="since">Since 1.3.5</span>, USB
controllers accept a <code>ports</code> attribute to configure how
many devices can be connected to the controller. The PowerPC64
"spapr-vio" addresses do not have an associated controller.
</p>
<p>

View File

@@ -1743,7 +1743,8 @@
</attribute>
</optional>
</group>
<!-- usb has an optional attribute "model", and optional subelement "master" -->
<!-- usb has an optional attribute "model",
and optional subelements "master" and "ports" -->
<group>
<attribute name="type">
<value>usb</value>
@@ -1768,6 +1769,11 @@
<optional>
<ref name="usbmaster"/>
</optional>
<optional>
<attribute name="ports">
<ref name="unsignedInt"/>
</attribute>
</optional>
</group>
<!-- pci has an optional attribute "model" -->
<group>