The support for this was added in QEMU with commit
830d70db692e374b55555f4407f96a1ceefdcc97. Unfortunately we have to do
another ugly version-based capability check. The other option would be
not to check for the capability at all and leave that to qemu as it's
doen with multiqueue tap devices.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 6 ++++++
src/qemu/qemu_capabilities.h | 1 +
2 files changed, 7 insertions(+)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 960afa4ac0db..f102ed80f15e 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -284,6 +284,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"aes-key-wrap",
"dea-key-wrap",
"pci-serial",
+ "vhost-user-multiq",
);
@@ -3283,6 +3284,11 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
if (qemuCaps->version >= 2002000)
virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACHINE_VMPORT_OPT);
+ /* vhost-user supports multi-queue from v2.4.0 onwards,
+ * but there is no way to query for that capability */
+ if (qemuCaps->version >= 2004000)
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_VHOSTUSER_MULTIQ);
+
if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0)
goto cleanup;
if (virQEMUCapsProbeQMPEvents(qemuCaps, mon) < 0)
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 9c956f3007be..3dbd767f2516 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -228,6 +228,7 @@ typedef enum {
QEMU_CAPS_AES_KEY_WRAP = 186, /* -machine aes_key_wrap */
QEMU_CAPS_DEA_KEY_WRAP = 187, /* -machine dea_key_wrap */
QEMU_CAPS_DEVICE_PCI_SERIAL = 188, /* -device pci-serial */
+ QEMU_CAPS_VHOSTUSER_MULTIQ = 189, /* vhost-user with -netdev queues= */
QEMU_CAPS_LAST, /* this must always be the last item */
} virQEMUCapsFlags;
--
2.4.2