From 40f3c23c0f062713a88a065a26bf662311fda600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Fri, 7 Sep 2018 14:37:34 +0200 Subject: [PATCH] qemu: always assume QEMU_CAPS_USB_REDIR_BOOTINDEX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added by QEMU commit 65bb3a5 contained in v1.1. Signed-off-by: Ján Tomko Reviewed-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 1 - src/qemu/qemu_capabilities.h | 2 +- src/qemu/qemu_command.c | 9 +-------- tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml | 1 - tests/qemuxml2argvtest.c | 3 +-- 18 files changed, 3 insertions(+), 26 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index b4658541c5..288d4461cd 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1219,7 +1219,6 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsPiix4PM[] = { static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsUSBRedir[] = { { "filter", QEMU_CAPS_USB_REDIR_FILTER }, - { "bootindex", QEMU_CAPS_USB_REDIR_BOOTINDEX }, }; static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsUSBHost[] = { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 0bd280f1d3..48549e8e65 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -210,7 +210,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */ /* 115 */ QEMU_CAPS_DRIVE_MIRROR, /* drive-mirror monitor command */ - QEMU_CAPS_USB_REDIR_BOOTINDEX, /* usb-redir.bootindex */ + X_QEMU_CAPS_USB_REDIR_BOOTINDEX, /* usb-redir.bootindex */ QEMU_CAPS_USB_HOST_BOOTINDEX, /* usb-host.bootindex */ QEMU_CAPS_DISK_SNAPSHOT, /* blockdev-snapshot-sync command */ QEMU_CAPS_DEVICE_QXL, /* -device qxl */ diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 88db9c6945..3381d6a9f7 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -9482,15 +9482,8 @@ qemuBuildRedirdevDevStr(const virDomainDef *def, } } - if (dev->info.bootIndex) { - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_USB_REDIR_BOOTINDEX)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("USB redirection booting is not " - "supported by this version of QEMU")); - goto error; - } + if (dev->info.bootIndex) virBufferAsprintf(&buf, ",bootindex=%u", dev->info.bootIndex); - } if (qemuBuildDeviceAddressStr(&buf, def, &dev->info, qemuCaps) < 0) goto error; diff --git a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml index 355d9b55af..141d2b9484 100644 --- a/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml index 903cb5b110..1091a1b213 100644 --- a/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml index f6f4c4bf49..41979e9dfa 100644 --- a/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml index 807a0309a8..63cb847e7c 100644 --- a/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml index 9e555473ac..c529b09113 100644 --- a/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml index c230df3461..b539bc71d7 100644 --- a/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.11.0.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml index 12b607d7ee..3d41b8f9f9 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml index c568a12f7c..26f50588fc 100644 --- a/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml index 0f55489dec..653d238413 100644 --- a/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml index f86147a48b..5e93a56432 100644 --- a/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml index b2f221c004..21a811c9a8 100644 --- a/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml index 5f78ed2000..3ae31609d2 100644 --- a/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml index 86f24c415b..20ec3a3311 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml index 217fbf119f..ed6114f10c 100644 --- a/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_3.0.0.x86_64.xml @@ -49,7 +49,6 @@ - diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 949b203998..6cad26bc7f 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1547,8 +1547,7 @@ mymain(void) QEMU_CAPS_USB_HUB, QEMU_CAPS_ICH9_USB_EHCI1, QEMU_CAPS_USB_REDIR, - QEMU_CAPS_SPICE, - QEMU_CAPS_USB_REDIR_BOOTINDEX); + QEMU_CAPS_SPICE); DO_TEST("usb-redir-filter", QEMU_CAPS_USB_HUB, QEMU_CAPS_ICH9_USB_EHCI1, -- GitLab