summaryrefslogtreecommitdiffstats
path: root/monitor/qmp-cmds.c
diff options
context:
space:
mode:
authorDaniel P. Berrangé2021-09-08 11:35:43 +0200
committerDaniel P. Berrangé2021-11-02 16:55:14 +0100
commitca411b7c8a230af7e83bcebda88b265335f0e4f8 (patch)
treed9169fee7dddd9b6869cfb4eeacfd91ea0983d87 /monitor/qmp-cmds.c
parentqapi: introduce x-query-rdma QMP command (diff)
downloadqemu-ca411b7c8a230af7e83bcebda88b265335f0e4f8.tar.gz
qemu-ca411b7c8a230af7e83bcebda88b265335f0e4f8.tar.xz
qemu-ca411b7c8a230af7e83bcebda88b265335f0e4f8.zip
qapi: introduce x-query-ramblock QMP command
This is a counterpart to the HMP "info ramblock" command. It is being added with an "x-" prefix because this QMP command is intended as an adhoc debugging tool and will thus not be modelled in QAPI as fully structured data, nor will it have long term guaranteed stability. The existing HMP command is rewritten to call the QMP command. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'monitor/qmp-cmds.c')
-rw-r--r--monitor/qmp-cmds.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
index 0a9ba7595c..a9766fa38d 100644
--- a/monitor/qmp-cmds.c
+++ b/monitor/qmp-cmds.c
@@ -38,6 +38,7 @@
#include "qapi/qapi-commands-ui.h"
#include "qapi/type-helpers.h"
#include "qapi/qmp/qerror.h"
+#include "exec/ramlist.h"
#include "hw/mem/memory-device.h"
#include "hw/acpi/acpi_dev_interface.h"
#include "hw/rdma/rdma.h"
@@ -414,3 +415,10 @@ HumanReadableText *qmp_x_query_rdma(Error **errp)
return human_readable_text_from_str(buf);
}
+
+HumanReadableText *qmp_x_query_ramblock(Error **errp)
+{
+ g_autoptr(GString) buf = ram_block_format();
+
+ return human_readable_text_from_str(buf);
+}