[PATCH 2/3] qemu_capabilities: add "query-stats" QMP command to the QEMU capabilities

Amneesh Singh natto at weirdnatto.in
Thu Jul 14 05:52:03 UTC 2022


Related: https://gitlab.com/libvirt/libvirt/-/issues/276

This patch adds "query-stats" to the QEMU capabilities.

Signed-off-by: Amneesh Singh <natto at weirdnatto.in>
---
 src/qemu/qemu_capabilities.c | 2 ++
 src/qemu/qemu_capabilities.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index fa8ffd19..9835dc82 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -672,6 +672,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
               "display-dbus", /* QEMU_CAPS_DISPLAY_DBUS */
               "iothread.thread-pool-max", /* QEMU_CAPS_IOTHREAD_THREAD_POOL_MAX */
               "usb-host.guest-resets-all", /* QEMU_CAPS_USB_HOST_GUESTS_RESETS_ALL */
+              "query-stats", /* QEMU_CAPS_QUERY_STATS */
     );
 
 
@@ -1226,6 +1227,7 @@ struct virQEMUCapsStringFlags virQEMUCapsCommands[] = {
     { "query-dirty-rate", QEMU_CAPS_QUERY_DIRTY_RATE },
     { "sev-inject-launch-secret", QEMU_CAPS_SEV_INJECT_LAUNCH_SECRET },
     { "calc-dirty-rate", QEMU_CAPS_CALC_DIRTY_RATE },
+    { "query-stats", QEMU_CAPS_QUERY_STATS },
 };
 
 struct virQEMUCapsStringFlags virQEMUCapsMigration[] = {
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index a409c127..62b28288 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -651,6 +651,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
     QEMU_CAPS_DISPLAY_DBUS, /* -display dbus */
     QEMU_CAPS_IOTHREAD_THREAD_POOL_MAX, /* -object iothread.thread-pool-max */
     QEMU_CAPS_USB_HOST_GUESTS_RESETS_ALL, /* -device usb-host.guest-resets-all */
+    QEMU_CAPS_QUERY_STATS,  /* accepts query-stats */
 
     QEMU_CAPS_LAST /* this must always be the last item */
 } virQEMUCapsFlags;
-- 
2.36.1



More information about the libvir-list mailing list