diff options
author | Maciej S. Szmigiero <maciej.szmigiero@oracle.com> | 2023-08-23 23:31:35 +0200 |
---|---|---|
committer | Maciej S. Szmigiero <maciej.szmigiero@oracle.com> | 2023-11-06 14:08:10 +0100 |
commit | 16dff2f9bb877bd1e147b5c5d9966d5a1d336c8c (patch) | |
tree | 9b7430bcdd16d689bd67c8c851b7a4c68e5c8d37 /hw/core | |
parent | 99a4706ae81efa51b21871af643626730a6719d4 (diff) | |
download | qemu-16dff2f9bb877bd1e147b5c5d9966d5a1d336c8c.zip qemu-16dff2f9bb877bd1e147b5c5d9966d5a1d336c8c.tar.gz qemu-16dff2f9bb877bd1e147b5c5d9966d5a1d336c8c.tar.bz2 |
qapi: Add query-memory-devices support to hv-balloon
Used by the driver to report its provided memory state information.
Co-developed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Diffstat (limited to 'hw/core')
-rw-r--r-- | hw/core/machine-hmp-cmds.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/core/machine-hmp-cmds.c b/hw/core/machine-hmp-cmds.c index 9a4b59c..a6ff6a4 100644 --- a/hw/core/machine-hmp-cmds.c +++ b/hw/core/machine-hmp-cmds.c @@ -253,6 +253,7 @@ void hmp_info_memory_devices(Monitor *mon, const QDict *qdict) MemoryDeviceInfo *value; PCDIMMDeviceInfo *di; SgxEPCDeviceInfo *se; + HvBalloonDeviceInfo *hi; for (info = info_list; info; info = info->next) { value = info->value; @@ -310,6 +311,20 @@ void hmp_info_memory_devices(Monitor *mon, const QDict *qdict) monitor_printf(mon, " node: %" PRId64 "\n", se->node); monitor_printf(mon, " memdev: %s\n", se->memdev); break; + case MEMORY_DEVICE_INFO_KIND_HV_BALLOON: + hi = value->u.hv_balloon.data; + monitor_printf(mon, "Memory device [%s]: \"%s\"\n", + MemoryDeviceInfoKind_str(value->type), + hi->id ? hi->id : ""); + if (hi->has_memaddr) { + monitor_printf(mon, " memaddr: 0x%" PRIx64 "\n", + hi->memaddr); + } + monitor_printf(mon, " max-size: %" PRIu64 "\n", hi->max_size); + if (hi->memdev) { + monitor_printf(mon, " memdev: %s\n", hi->memdev); + } + break; default: g_assert_not_reached(); } |