extend usb controller model to support xen pvusb

According to libxl implementation, it supports pvusb
controller of version 1.1 and version 2.0, and it
supports two types of backend, 'pvusb' (dom0 backend)
and 'qusb' (qemu backend). But currently pvusb backend
is not checked in yet.

To match libxl support, extend usb controller schema
to support two more models: qusb1 (qusb, version 1.1)
and 'qusb2' (qusb version 2.0).

Signed-off-by: Chunyan Liu <cyliu@suse.com>
This commit is contained in:
Chunyan Liu 2016-06-15 14:00:08 +08:00 committed by Cédric Bosdonnat
parent 8941c800ec
commit be146b349f
6 changed files with 17 additions and 1 deletions

View File

@ -3122,7 +3122,9 @@
<dd>A <code>usb</code> controller has an optional attribute
<code>model</code>, which is one of "piix3-uhci", "piix4-uhci",
"ehci", "ich9-ehci1", "ich9-uhci1", "ich9-uhci2", "ich9-uhci3",
"vt82c686b-uhci", "pci-ohci" or "nec-xhci". Additionally,
"vt82c686b-uhci", "pci-ohci", "nec-xhci", "qusb1" (xen pvusb
with qemu backend, version 1.1) or "qusb2" (xen pvusb with qemu
backend, version 2.0). Additionally,
<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

View File

@ -1782,6 +1782,8 @@
<value>pci-ohci</value>
<value>nec-xhci</value>
<value>none</value>
<value>qusb1</value>
<value>qusb2</value>
</choice>
</attribute>
</optional>

View File

@ -1393,6 +1393,12 @@ virDomainUSBAddressControllerModelToPorts(virDomainControllerDefPtr cont)
return cont->opts.usbopts.ports;
return 4;
case VIR_DOMAIN_CONTROLLER_MODEL_USB_QUSB1:
case VIR_DOMAIN_CONTROLLER_MODEL_USB_QUSB2:
if (cont->opts.usbopts.ports != -1)
return cont->opts.usbopts.ports;
return 8;
case VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE:
case VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST:
break;

View File

@ -359,6 +359,8 @@ VIR_ENUM_IMPL(virDomainControllerModelUSB, VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST,
"vt82c686b-uhci",
"pci-ohci",
"nec-xhci",
"qusb1",
"qusb2",
"none")
VIR_ENUM_IMPL(virDomainFS, VIR_DOMAIN_FS_TYPE_LAST,

View File

@ -681,6 +681,8 @@ typedef enum {
VIR_DOMAIN_CONTROLLER_MODEL_USB_VT82C686B_UHCI,
VIR_DOMAIN_CONTROLLER_MODEL_USB_PCI_OHCI,
VIR_DOMAIN_CONTROLLER_MODEL_USB_NEC_XHCI,
VIR_DOMAIN_CONTROLLER_MODEL_USB_QUSB1,
VIR_DOMAIN_CONTROLLER_MODEL_USB_QUSB2,
VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE,
VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST

View File

@ -133,6 +133,8 @@ VIR_ENUM_IMPL(qemuControllerModelUSB, VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST,
"vt82c686b-usb-uhci",
"pci-ohci",
"nec-usb-xhci",
"qusb1",
"qusb2",
"none");
VIR_ENUM_DECL(qemuDomainFSDriver)