mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-05 12:35:20 +00:00
qemu: auto-add generic xhci rather than NEC xhci to Q35 domains
We recently added a generic XHCI USB3 controller to QEMU, and libvirt supports adding that controller rather than the NEC XHCI USB3 controller, but when auto-adding a USB controller to Q35 domains we were still adding the vendor-specific NEC controller. This patch changes to add the generic controller instead, if it's available in the QEMU binary that will be used. Signed-off-by: Laine Stump <laine@laine.org> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
ba9ea2ad7d
commit
ed2049ea19
@ -2660,12 +2660,13 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def,
|
|||||||
addPCIeRoot = true;
|
addPCIeRoot = true;
|
||||||
addImplicitSATA = true;
|
addImplicitSATA = true;
|
||||||
|
|
||||||
/* Prefer adding USB3 controller if supported
|
/* Prefer adding a USB3 controller if supported, fall back
|
||||||
* (nec-usb-xhci). Failing that, add a USB2 controller set
|
* to USB2 if there is no USB3 available, and if that's
|
||||||
* if the ich9-usb-ehci1 device is supported. Otherwise
|
* unavailable don't add anything.
|
||||||
* don't add anything.
|
|
||||||
*/
|
*/
|
||||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NEC_USB_XHCI))
|
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_QEMU_XHCI))
|
||||||
|
usbModel = VIR_DOMAIN_CONTROLLER_MODEL_USB_QEMU_XHCI;
|
||||||
|
else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NEC_USB_XHCI))
|
||||||
usbModel = VIR_DOMAIN_CONTROLLER_MODEL_USB_NEC_XHCI;
|
usbModel = VIR_DOMAIN_CONTROLLER_MODEL_USB_NEC_XHCI;
|
||||||
else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_USB_EHCI1))
|
else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_ICH9_USB_EHCI1))
|
||||||
usbModel = VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_EHCI1;
|
usbModel = VIR_DOMAIN_CONTROLLER_MODEL_USB_ICH9_EHCI1;
|
||||||
|
Loading…
Reference in New Issue
Block a user