diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2021-09-08 10:35:43 +0100 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2021-11-02 15:55:14 +0000 |
commit | ca411b7c8a230af7e83bcebda88b265335f0e4f8 (patch) | |
tree | d9169fee7dddd9b6869cfb4eeacfd91ea0983d87 /monitor | |
parent | 8dbbca5c056842d53498f643a15cac8593d51424 (diff) | |
download | qemu-ca411b7c8a230af7e83bcebda88b265335f0e4f8.zip qemu-ca411b7c8a230af7e83bcebda88b265335f0e4f8.tar.gz qemu-ca411b7c8a230af7e83bcebda88b265335f0e4f8.tar.bz2 |
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')
-rw-r--r-- | monitor/hmp-cmds.c | 6 | ||||
-rw-r--r-- | monitor/qmp-cmds.c | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 9d22162..90f9a64 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -52,7 +52,6 @@ #include "ui/console.h" #include "qemu/cutils.h" #include "qemu/error-report.h" -#include "exec/ramlist.h" #include "hw/intc/intc.h" #include "migration/snapshot.h" #include "migration/misc.h" @@ -2176,11 +2175,6 @@ void hmp_rocker_of_dpa_groups(Monitor *mon, const QDict *qdict) qapi_free_RockerOfDpaGroupList(list); } -void hmp_info_ramblock(Monitor *mon, const QDict *qdict) -{ - ram_block_dump(mon); -} - void hmp_info_vm_generation_id(Monitor *mon, const QDict *qdict) { Error *err = NULL; diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index 0a9ba75..a9766fa 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); +} |