qemu: Add xhci support

qemu 1.1 features a xhci controller,
this patch adds support for it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2012-06-21 15:45:25 +02:00 committed by Michal Privoznik
parent d62e51f86b
commit fd4fd420b4
9 changed files with 17 additions and 5 deletions

View File

@ -243,6 +243,7 @@ Patches have also been contributed by:
Beat Jörg <Beat.Joerg@ssatr.ch>
Gao feng <gaofeng@cn.fujitsu.com>
Dipankar Sarma <dipankar@in.ibm.com>
Gerd Hoffmann <kraxel@redhat.com>
[....send patches to get your name here....]

View File

@ -1820,8 +1820,8 @@
A "usb" 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" or "pci-ohci". The PowerPC64 "spapr-vio"
addresses do not have an associated controller.
"vt82c686b-uhci", "pci-ohci" or "nec-xhci". The PowerPC64
"spapr-vio" addresses do not have an associated controller.
</p>
<p>

View File

@ -1201,6 +1201,7 @@
<value>ich9-uhci3</value>
<value>vt82c686b-uhci</value>
<value>pci-ohci</value>
<value>nec-xhci</value>
</choice>
</attribute>
</optional>

View File

@ -257,7 +257,8 @@ VIR_ENUM_IMPL(virDomainControllerModelUSB, VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST,
"ich9-uhci2",
"ich9-uhci3",
"vt82c686b-uhci",
"pci-ohci")
"pci-ohci",
"nec-xhci")
VIR_ENUM_IMPL(virDomainFS, VIR_DOMAIN_FS_TYPE_LAST,
"mount",

View File

@ -631,6 +631,7 @@ enum virDomainControllerModelUSB {
VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_UHCI3,
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_LAST
};

View File

@ -165,6 +165,7 @@ VIR_ENUM_IMPL(qemuCaps, QEMU_CAPS_LAST,
"hda-micro", /* 95 */
"dump-guest-memory",
"nec-usb-xhci",
);
@ -1421,6 +1422,8 @@ qemuCapsParseDeviceStr(const char *str, virBitmapPtr flags)
qemuCapsSet(flags, QEMU_CAPS_VT82C686B_USB_UHCI);
if (strstr(str, "name \"pci-ohci\""))
qemuCapsSet(flags, QEMU_CAPS_PCI_OHCI);
if (strstr(str, "name \"nec-usb-xhci\""))
qemuCapsSet(flags, QEMU_CAPS_NEC_USB_XHCI);
if (strstr(str, "name \"usb-redir\""))
qemuCapsSet(flags, QEMU_CAPS_USB_REDIR);
if (strstr(str, "name \"usb-hub\""))

View File

@ -132,6 +132,7 @@ enum qemuCapsFlags {
QEMU_CAPS_NO_USER_CONFIG = 94, /* -no-user-config */
QEMU_CAPS_HDA_MICRO = 95, /* -device hda-micro */
QEMU_CAPS_DUMP_GUEST_MEMORY = 96, /* dump-guest-memory command */
QEMU_CAPS_NEC_USB_XHCI = 97, /* -device nec-usb-xhci */
QEMU_CAPS_LAST, /* this must always be the last item */
};

View File

@ -106,7 +106,8 @@ VIR_ENUM_IMPL(qemuControllerModelUSB, VIR_DOMAIN_CONTROLLER_MODEL_USB_LAST,
"ich9-usb-uhci2",
"ich9-usb-uhci3",
"vt82c686b-usb-uhci",
"pci-ohci");
"pci-ohci",
"nec-usb-xhci");
VIR_ENUM_DECL(qemuDomainFSDriver)
VIR_ENUM_IMPL(qemuDomainFSDriver, VIR_DOMAIN_FS_DRIVER_TYPE_LAST,
@ -2598,6 +2599,8 @@ qemuControllerModelUSBToCaps(int model)
return QEMU_CAPS_VT82C686B_USB_UHCI;
case VIR_DOMAIN_CONTROLLER_MODEL_USB_PCI_OHCI:
return QEMU_CAPS_PCI_OHCI;
case VIR_DOMAIN_CONTROLLER_MODEL_USB_NEC_XHCI:
return QEMU_CAPS_NEC_USB_XHCI;
default:
return -1;
}

View File

@ -753,7 +753,8 @@ mymain(void)
QEMU_CAPS_SCSI_CD,
QEMU_CAPS_IDE_CD,
QEMU_CAPS_NO_USER_CONFIG,
QEMU_CAPS_HDA_MICRO);
QEMU_CAPS_HDA_MICRO,
QEMU_CAPS_NEC_USB_XHCI);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
}