From 9aa3397f1999e569eae266cab844391e5ab65d81 Mon Sep 17 00:00:00 2001 From: Vadim Galitsyn Date: Tue, 29 Aug 2017 17:30:21 +0200 Subject: qmp: introduce query-memory-size-summary command Add a new query-memory-size-summary command which provides the following memory information in bytes: * base-memory - size of "base" memory specified with command line option -m. * plugged-memory - amount of memory that was hot-plugged. If target does not have CONFIG_MEM_HOTPLUG enabled, no value is reported. Signed-off-by: Vasilis Liaskovitis Signed-off-by: Mohammed Gamal Signed-off-by: Eduardo Otubo Signed-off-by: Vadim Galitsyn Reviewed-by: Eugene Crosser Cc: Dr. David Alan Gilbert Cc: Markus Armbruster Cc: Igor Mammedov Cc: Eric Blake Cc: qemu-devel@nongnu.org Message-Id: <20170829153022.27004-3-vadim.galitsyn@profitbricks.com> Reviewed-by: Igor Mammedov Signed-off-by: Dr. David Alan Gilbert Fixup comments as per Igor's review Added 'of' from Vadim's reply --- stubs/Makefile.objs | 2 +- stubs/qmp_pc_dimm.c | 13 +++++++++++++ stubs/qmp_pc_dimm_device_list.c | 8 -------- 3 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 stubs/qmp_pc_dimm.c delete mode 100644 stubs/qmp_pc_dimm_device_list.c (limited to 'stubs') diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index 4a33495911..c7594796c3 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -33,7 +33,7 @@ stub-obj-y += uuid.o stub-obj-y += vm-stop.o stub-obj-y += vmstate.o stub-obj-$(CONFIG_WIN32) += fd-register.o -stub-obj-y += qmp_pc_dimm_device_list.o +stub-obj-y += qmp_pc_dimm.o stub-obj-y += target-monitor-defs.o stub-obj-y += target-get-monitor-def.o stub-obj-y += pc_madt_cpu_entry.o diff --git a/stubs/qmp_pc_dimm.c b/stubs/qmp_pc_dimm.c new file mode 100644 index 0000000000..9ddc4f619a --- /dev/null +++ b/stubs/qmp_pc_dimm.c @@ -0,0 +1,13 @@ +#include "qemu/osdep.h" +#include "qom/object.h" +#include "hw/mem/pc-dimm.h" + +int qmp_pc_dimm_device_list(Object *obj, void *opaque) +{ + return 0; +} + +uint64_t get_plugged_memory_size(void) +{ + return (uint64_t)-1; +} diff --git a/stubs/qmp_pc_dimm_device_list.c b/stubs/qmp_pc_dimm_device_list.c deleted file mode 100644 index def211564d..0000000000 --- a/stubs/qmp_pc_dimm_device_list.c +++ /dev/null @@ -1,8 +0,0 @@ -#include "qemu/osdep.h" -#include "qom/object.h" -#include "hw/mem/pc-dimm.h" - -int qmp_pc_dimm_device_list(Object *obj, void *opaque) -{ - return 0; -} -- cgit v1.2.1