diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2016-02-10 11:49:22 +0300 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:45:30 -0600 |
commit | f79aed9d7c6f53ed511488ec95383e8ace4cb3b3 (patch) | |
tree | abceb0923042a16355c685c364eda442aa2777cd /hw/mem | |
parent | b562e2359d06a9e26007ef2647b8fcb0d8fa67cd (diff) | |
download | hqemu-f79aed9d7c6f53ed511488ec95383e8ace4cb3b3.zip hqemu-f79aed9d7c6f53ed511488ec95383e8ace4cb3b3.tar.gz |
move get_current_ram_size to virtio-balloon.c
get_current_ram_size() is used only in virtio-balloon.c
This patch moves it into virtio-balloon and make it static, to allow
some balloon-specific tuning.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/mem')
-rw-r--r-- | hw/mem/pc-dimm.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 1aa12c6..650f0f8 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -192,32 +192,6 @@ int qmp_pc_dimm_device_list(Object *obj, void *opaque) return 0; } -ram_addr_t get_current_ram_size(void) -{ - MemoryDeviceInfoList *info_list = NULL; - MemoryDeviceInfoList **prev = &info_list; - MemoryDeviceInfoList *info; - ram_addr_t size = ram_size; - - qmp_pc_dimm_device_list(qdev_get_machine(), &prev); - for (info = info_list; info; info = info->next) { - MemoryDeviceInfo *value = info->value; - - if (value) { - switch (value->type) { - case MEMORY_DEVICE_INFO_KIND_DIMM: - size += value->u.dimm->size; - break; - default: - break; - } - } - } - qapi_free_MemoryDeviceInfoList(info_list); - - return size; -} - static int pc_dimm_slot2bitmap(Object *obj, void *opaque) { unsigned long *bitmap = opaque; |