From 04bf98a418a15b9ccb1a72374d2e1022fc017162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Mon, 22 Aug 2022 16:49:17 +0200 Subject: [PATCH] qemu: assume QEMU_CAPS_NEC_USB_XHCI_PORTS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduced by QEMU commit 0846e6359c407e372f446723b8b7b09ac20d0f03 released in QEMU 1.3.0 Signed-off-by: Ján Tomko Reviewed-by: Peter Krempa --- src/qemu/qemu_command.c | 3 +-- tests/qemuxml2argvtest.c | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 58d29d8348..7ec44736d3 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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"), diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index cd316e06f9..5845f825d7 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -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",