mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
d62e51f86b
commit
fd4fd420b4
1
AUTHORS
1
AUTHORS
|
@ -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....]
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -1201,6 +1201,7 @@
|
|||
<value>ich9-uhci3</value>
|
||||
<value>vt82c686b-uhci</value>
|
||||
<value>pci-ohci</value>
|
||||
<value>nec-xhci</value>
|
||||
</choice>
|
||||
</attribute>
|
||||
</optional>
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
|
@ -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\""))
|
||||
|
|
|
@ -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 */
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue