]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: add virtio-blk-vhost-vdpa capability
authorJonathon Jongsma <jjongsma@redhat.com>
Fri, 17 Mar 2023 15:25:47 +0000 (10:25 -0500)
committerJonathon Jongsma <jjongsma@redhat.com>
Tue, 12 Sep 2023 16:06:41 +0000 (11:06 -0500)
Check whether the qemu binary supports the vdpa block driver. We can't
rely simply on the existence of the virtio-blk-vhost-vdpa block driver
since the first releases of qemu didn't support fd-passing for this
driver. So we have to check for the 'fdset' feature on the driver
object. This feature will be present in the qemu 8.1.0 release and was
merged to qemu in commit 98b126f5.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml

index 87412dd4ecffbcf4f40da1c91dc7e284ff69e00f..3a1bfbf74dc4954bbe9157741efba316701a3478 100644 (file)
@@ -697,6 +697,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
 
               /* 450 */
               "run-with.async-teardown", /* QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN */
+              "virtio-blk-vhost-vdpa", /* QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA */
     );
 
 
@@ -1531,6 +1532,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
     { "blockdev-add/arg-type/+rbd/encrypt/format/^luks-any", QEMU_CAPS_RBD_ENCRYPTION_LUKS_ANY },
     { "blockdev-add/arg-type/+nbd/tls-hostname", QEMU_CAPS_BLOCKDEV_NBD_TLS_HOSTNAME },
     { "blockdev-add/arg-type/+qcow2/discard-no-unref", QEMU_CAPS_QCOW2_DISCARD_NO_UNREF },
+    { "blockdev-add/arg-type/+virtio-blk-vhost-vdpa/$fdset", QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA},
     { "blockdev-snapshot/$allow-write-only-overlay", QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY },
     { "chardev-add/arg-type/backend/+socket/data/reconnect", QEMU_CAPS_CHARDEV_RECONNECT },
     { "device_add/$json-cli-hotplug", QEMU_CAPS_DEVICE_JSON },
index e51d3fffdc7f3c0e8bf093ef18c26f45e19096e3..3c4f7f625b45c51318b9b9dad292d49142590330 100644 (file)
@@ -676,6 +676,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
 
     /* 450 */
     QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN, /* asynchronous teardown -run-with async-teardown=on|off */
+    QEMU_CAPS_DEVICE_VIRTIO_BLK_VHOST_VDPA, /* virtio-blk-vhost-vdpa block driver */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
index 6f8c5a57b7a0f0a207b874d5073cabe2efe23cd7..d266dd0f31cfb55bd97dfe6e725e30eb7120819d 100644 (file)
   <flag name='rbd-encryption-luks-any'/>
   <flag name='qcow2-discard-no-unref'/>
   <flag name='run-with.async-teardown'/>
+  <flag name='virtio-blk-vhost-vdpa'/>
   <version>8001000</version>
   <microcodeVersion>43100245</microcodeVersion>
   <package>v8.1.0</package>