mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
99a4706ae8
commit
16dff2f9bb
3 changed files with 78 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue