aboutsummaryrefslogtreecommitdiff
path: root/qmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'qmp.c')
-rw-r--r--qmp.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/qmp.c b/qmp.c
index b86201e349..e8c303116a 100644
--- a/qmp.c
+++ b/qmp.c
@@ -709,3 +709,16 @@ ACPIOSTInfoList *qmp_query_acpi_ospm_status(Error **errp)
return head;
}
+
+MemoryInfo *qmp_query_memory_size_summary(Error **errp)
+{
+ MemoryInfo *mem_info = g_malloc0(sizeof(MemoryInfo));
+
+ mem_info->base_memory = ram_size;
+
+ mem_info->plugged_memory = get_plugged_memory_size();
+ mem_info->has_plugged_memory =
+ mem_info->plugged_memory != (uint64_t)-1;
+
+ return mem_info;
+}