[PATCH v1 3/6] qemu_capabilities: Introduce QEMU_CAPS_DIRTYRATE_MODE capability

huangy81 at chinatelecom.cn huangy81 at chinatelecom.cn
Thu Jan 27 03:36:19 UTC 2022


From: Hyman Huang(黄勇) <huangy81 at chinatelecom.cn>

mode option of calc-dirty-rate command since qemu >=6.2.0.
Introduce QEMU_CAPS_DIRTYRATE_MODE capability definition.

Signed-off-by: Hyman Huang(黄勇) <huangy81 at chinatelecom.cn>
---
 src/qemu/qemu_capabilities.c                     | 2 ++
 src/qemu/qemu_capabilities.h                     | 1 +
 tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml  | 1 +
 tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 +
 tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml  | 1 +
 tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 +
 6 files changed, 7 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index de08e81..367c286 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -658,6 +658,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
               /* 420 */
               "device.json+hotplug", /* QEMU_CAPS_DEVICE_JSON */
               "calc-dirty-rate", /* QEMU_CAPS_CALC_DIRTY_RATE */
+              "dirtyrate-param.mode", /* QEMU_CAPS_DIRTYRATE_MODE */
     );
 
 
@@ -1576,6 +1577,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
     { "screendump/arg-type/device", QEMU_CAPS_SCREENDUMP_DEVICE },
     { "set-numa-node/arg-type/+hmat-lb", QEMU_CAPS_NUMA_HMAT },
     { "object-add/arg-type/+sev-guest/kernel-hashes", QEMU_CAPS_SEV_GUEST_KERNEL_HASHES },
+    { "calc-dirty-rate/arg-type/mode", QEMU_CAPS_DIRTYRATE_MODE },
 };
 
 typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps;
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 598cef9..329701c 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -637,6 +637,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
     /* 420 */
     QEMU_CAPS_DEVICE_JSON, /* -device accepts JSON (and works with hot-unplug) */
     QEMU_CAPS_CALC_DIRTY_RATE, /* accepts calc-dirty-rate */
+    QEMU_CAPS_DIRTYRATE_MODE , /* calc-dirty-rate accepts mode parameter */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
index eaa0ccc..9fe9c27 100644
--- a/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_6.2.0.ppc64.xml
@@ -200,6 +200,7 @@
   <flag name='rbd-encryption'/>
   <flag name='sev-guest-kernel-hashes'/>
   <flag name='calc-dirty-rate'/>
+  <flag name='dirtyrate-param.mode'/>
   <version>6002000</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>42900244</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml
index f3e86de..d77907a 100644
--- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml
@@ -240,6 +240,7 @@
   <flag name='sev-guest-kernel-hashes'/>
   <flag name='sev-inject-launch-secret'/>
   <flag name='calc-dirty-rate'/>
+  <flag name='dirtyrate-param.mode'/>
   <version>6002000</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>43100244</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml
index e9e9b43..5d7f283 100644
--- a/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_7.0.0.ppc64.xml
@@ -201,6 +201,7 @@
   <flag name='sev-guest-kernel-hashes'/>
   <flag name='device.json+hotplug'/>
   <flag name='calc-dirty-rate'/>
+  <flag name='dirtyrate-param.mode'/>
   <version>6002050</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>42900243</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml
index e28b48e..6bc6e7f 100644
--- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml
@@ -241,6 +241,7 @@
   <flag name='sev-inject-launch-secret'/>
   <flag name='device.json+hotplug'/>
   <flag name='calc-dirty-rate'/>
+  <flag name='dirtyrate-param.mode'/>
   <version>6002050</version>
   <kvmVersion>0</kvmVersion>
   <microcodeVersion>43100243</microcodeVersion>
-- 
1.8.3.1





More information about the libvir-list mailing list