summaryrefslogtreecommitdiffstats
path: root/hw/virtio
diff options
context:
space:
mode:
authorPaolo Bonzini2020-10-28 11:24:22 +0100
committerPaolo Bonzini2020-12-10 18:15:10 +0100
commitb326b6ea7998912d0bb0565ffef34efdfe9016dc (patch)
tree0c4dab1f43755ae5aee10d3a9257338ead2dc720 /hw/virtio
parentsparc64: do not use ram_size global (diff)
downloadqemu-b326b6ea7998912d0bb0565ffef34efdfe9016dc.tar.gz
qemu-b326b6ea7998912d0bb0565ffef34efdfe9016dc.tar.xz
qemu-b326b6ea7998912d0bb0565ffef34efdfe9016dc.zip
make ram_size local to vl.c
Use the machine properties for the leftovers too. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/virtio')
-rw-r--r--hw/virtio/virtio-balloon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index b22b5beda3..e83017c02d 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -20,6 +20,7 @@
#include "hw/virtio/virtio.h"
#include "hw/mem/pc-dimm.h"
#include "hw/qdev-properties.h"
+#include "hw/boards.h"
#include "sysemu/balloon.h"
#include "hw/virtio/virtio-balloon.h"
#include "exec/address-spaces.h"
@@ -748,7 +749,7 @@ static int build_dimm_list(Object *obj, void *opaque)
static ram_addr_t get_current_ram_size(void)
{
GSList *list = NULL, *item;
- ram_addr_t size = ram_size;
+ ram_addr_t size = current_machine->ram_size;
build_dimm_list(qdev_get_machine(), &list);
for (item = list; item; item = g_slist_next(item)) {