qemu: assume QEMU_CAPS_NEC_USB_XHCI_PORTS

Introduced by QEMU commit 0846e6359c407e372f446723b8b7b09ac20d0f03
released in QEMU 1.3.0

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
Ján Tomko 2022-08-22 16:49:17 +02:00
parent 935865e057
commit 04bf98a418
2 changed files with 3 additions and 7 deletions

View File

@ -2497,8 +2497,7 @@ qemuValidateDomainDeviceDefControllerUSB(const virDomainControllerDef *def,
}
if (def->opts.usbopts.ports != -1) {
if ((def->model != VIR_DOMAIN_CONTROLLER_MODEL_USB_NEC_XHCI ||
!virQEMUCapsGet(qemuCaps, QEMU_CAPS_NEC_USB_XHCI_PORTS)) &&
if (def->model != VIR_DOMAIN_CONTROLLER_MODEL_USB_NEC_XHCI &&
def->model != VIR_DOMAIN_CONTROLLER_MODEL_USB_QEMU_XHCI) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("usb controller type '%s' doesn't support 'ports' with this QEMU binary"),

View File

@ -1795,17 +1795,14 @@ mymain(void)
QEMU_CAPS_PIIX3_USB_UHCI);
DO_TEST("usb-controller-xhci",
QEMU_CAPS_PIIX3_USB_UHCI,
QEMU_CAPS_NEC_USB_XHCI,
QEMU_CAPS_NEC_USB_XHCI_PORTS);
QEMU_CAPS_NEC_USB_XHCI);
DO_TEST("usb-xhci-autoassign",
QEMU_CAPS_PIIX3_USB_UHCI,
QEMU_CAPS_NEC_USB_XHCI,
QEMU_CAPS_NEC_USB_XHCI_PORTS,
QEMU_CAPS_USB_HUB);
DO_TEST_PARSE_ERROR("usb-controller-xhci-limit",
QEMU_CAPS_PIIX3_USB_UHCI,
QEMU_CAPS_NEC_USB_XHCI,
QEMU_CAPS_NEC_USB_XHCI_PORTS);
QEMU_CAPS_NEC_USB_XHCI);
DO_TEST("usb-controller-qemu-xhci", QEMU_CAPS_DEVICE_QEMU_XHCI);
DO_TEST_FAILURE_NOCAPS("usb-controller-qemu-xhci-unavailable");
DO_TEST_PARSE_ERROR("usb-controller-qemu-xhci-limit",