[PATCH v2 1/5] qemu_capabilities: Introduce QEMU_CAPS_AIO_IO_URING

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add io_uring value to capability replies.

The capability QEMU_CAPS_AIO_IO_URING will be used for io_uring aio mode,
introduced from QEMU 5.0, linux 5.1.

Signed-off-by: Han Han <hhan@xxxxxxxxxx>
---
 src/qemu/qemu_capabilities.c                          | 2 ++
 src/qemu/qemu_capabilities.h                          | 1 +
 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies | 3 ++-
 tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml     | 1 +
 tests/qemucapabilitiesdata/caps_5.0.0.ppc64.replies   | 3 ++-
 tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml       | 1 +
 tests/qemucapabilitiesdata/caps_5.0.0.x86_64.replies  | 3 ++-
 tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml      | 1 +
 8 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index fe311048..f6b3c96a 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -573,6 +573,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
               "fsdev.multidevs",
               "virtio.packed",
               "pcie-root-port.hotplug",
+              "aio.io_uring",
     );
 
 
@@ -1461,6 +1462,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
     { "blockdev-add/arg-type/+nvme", QEMU_CAPS_DRIVE_NVME },
     { "query-named-block-nodes/arg-type/flat", QEMU_CAPS_QMP_QUERY_NAMED_BLOCK_NODES_FLAT },
     { "blockdev-snapshot/$allow-write-only-overlay", QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY },
+    { "blockdev-add/arg-type/+file/aio/^io_uring", QEMU_CAPS_AIO_IO_URING },
 };
 
 typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps;
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 1681fc79..0e9a161f 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -554,6 +554,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
     QEMU_CAPS_FSDEV_MULTIDEVS, /* fsdev.multidevs */
     QEMU_CAPS_VIRTIO_PACKED_QUEUES, /* virtio.packed */
     QEMU_CAPS_PCIE_ROOT_PORT_HOTPLUG, /* pcie-root-port.hotplug */
+    QEMU_CAPS_AIO_IO_URING, /* -blockdev {...,"aio":"io_uring",...} */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies
index 067cbb7e..3baa49b2 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.replies
@@ -19327,7 +19327,8 @@
       "meta-type": "enum",
       "values": [
         "threads",
-        "native"
+        "native",
+        "io_uring"
       ]
     },
     {
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index 3876d08c..9e3fe87e 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -184,6 +184,7 @@
   <flag name='storage.werror'/>
   <flag name='fsdev.multidevs'/>
   <flag name='virtio.packed'/>
+  <flag name='aio.io_uring'/>
   <version>4002050</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>61700241</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.replies b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.replies
index 8e754bfb..491bf754 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.replies
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.replies
@@ -20845,7 +20845,8 @@
       "meta-type": "enum",
       "values": [
         "threads",
-        "native"
+        "native",
+        "io_uring"
       ]
     },
     {
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index b0891613..fe77d3b7 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -192,6 +192,7 @@
   <flag name='storage.werror'/>
   <flag name='fsdev.multidevs'/>
   <flag name='virtio.packed'/>
+  <flag name='aio.io_uring'/>
   <version>4002050</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>42900241</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.replies b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.replies
index af2299a4..970e483e 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.replies
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.replies
@@ -22244,7 +22244,8 @@
       "meta-type": "enum",
       "values": [
         "threads",
-        "native"
+        "native",
+        "io_uring"
       ]
     },
     {
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
index 496d0e90..9bbc3c96 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -230,6 +230,7 @@
   <flag name='fsdev.multidevs'/>
   <flag name='virtio.packed'/>
   <flag name='pcie-root-port.hotplug'/>
+  <flag name='aio.io_uring'/>
   <version>4002091</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>43100241</microcodeVersion>
-- 
2.25.0





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux