]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Detect support for vxhs
authorJohn Ferlan <jferlan@redhat.com>
Tue, 29 Aug 2017 22:44:19 +0000 (18:44 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 20 Sep 2017 01:10:21 +0000 (21:10 -0400)
Using the query-qmp-schema introspection - look for the 'vxhs'
blockdevOptions type.

NB: This is a "best effort" type situation as there is not a
    mechanism to determine whether the running QEMU has been
    built with '--enable-vxhs'. All we can do is check if the
    option to use vxhs for a blockdev-add exists in the command
    infrastructure which does not take that into account when
    building its table of commands and options.

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml

index 7bc88be0f59daba31234727c2d60ddaab338581f..7bfb7142022fe396a486c1f5f7dd14c20e7eda8f 100644 (file)
@@ -439,6 +439,9 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
               "virtio-net.tx_queue_size",
               "chardev-reconnect",
               "virtio-gpu.max_outputs",
+
+              /* 270 */
+              "vxhs",
     );
 
 
@@ -1810,6 +1813,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsIntelIOMMU[] = {
 static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
     { "blockdev-add/arg-type/options/+gluster/debug-level", QEMU_CAPS_GLUSTER_DEBUG_LEVEL},
     { "blockdev-add/arg-type/+gluster/debug", QEMU_CAPS_GLUSTER_DEBUG_LEVEL},
+    { "blockdev-add/arg-type/+vxhs", QEMU_CAPS_VXHS},
 };
 
 struct virQEMUCapsObjectTypeProps {
index 1400e885d9a491647526ac763280ad87f315f656..214734ff2c6388f5f04660a8ae7db10b49722b50 100644 (file)
@@ -426,6 +426,9 @@ typedef enum {
     QEMU_CAPS_CHARDEV_RECONNECT, /* -chardev reconnect */
     QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS, /* -device virtio-(vga|gpu-*),max-outputs= */
 
+    /* 270 */
+    QEMU_CAPS_VXHS, /* -drive file.driver=vxhs via query-qmp-schema */
+
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
 
index 60492112253992c2df17d6b56b59e88b4ba9d46a..8a31431c09f7b37cd76eb496494e1927f776e8ab 100644 (file)
   <flag name='virtio-net.tx_queue_size'/>
   <flag name='chardev-reconnect'/>
   <flag name='virtio-gpu.max_outputs'/>
+  <flag name='vxhs'/>
   <version>2010000</version>
   <kvmVersion>0</kvmVersion>
   <package> (v2.10.0)</package>