]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Add capability for vhost-user multiqueue
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 4 Jun 2015 09:37:37 +0000 (11:37 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 11 Jun 2015 12:18:41 +0000 (14:18 +0200)
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
done with multiqueue tap devices.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h

index ca7a7c21ea39349582de158af377c58bd809d75e..c519aec9b7b4882af66545f718053212aa84b62c 100644 (file)
@@ -285,6 +285,8 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
               "dea-key-wrap",
               "pci-serial",
               "aarch64-off",
+
+              "vhost-user-multiq", /* 190 */
     );
 
 
@@ -3308,6 +3310,11 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps,
         qemuCaps->version >= 2003000)
         virQEMUCapsSet(qemuCaps, QEMU_CAPS_CPU_AARCH64_OFF);
 
+    /* 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)
index b5a7770f0f1979166e28a7499ebad067c8128235..3c166b6fd79ee65b8d105e8516bf4b3db1e39c80 100644 (file)
@@ -229,6 +229,7 @@ typedef enum {
     QEMU_CAPS_DEA_KEY_WRAP       = 187, /* -machine dea_key_wrap */
     QEMU_CAPS_DEVICE_PCI_SERIAL  = 188, /* -device pci-serial */
     QEMU_CAPS_CPU_AARCH64_OFF    = 189, /* -cpu ...,aarch64=off */
+    QEMU_CAPS_VHOSTUSER_MULTIQ   = 190, /* vhost-user with -netdev queues= */
 
     QEMU_CAPS_LAST,                   /* this must always be the last item */
 } virQEMUCapsFlags;