aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_vio.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-10-28 06:17:31 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-12-10 12:15:09 -0500
commitead2b283ad7b828252011c35a9407204010138af (patch)
tree92fc9e1d91b2888152678f38f9289910432010c3 /hw/ppc/spapr_vio.c
parent541693a4195508a077fc10e5803d0a5b4f76838a (diff)
downloadqemu-ead2b283ad7b828252011c35a9407204010138af.zip
qemu-ead2b283ad7b828252011c35a9407204010138af.tar.gz
qemu-ead2b283ad7b828252011c35a9407204010138af.tar.bz2
ppc: do not use ram_size global
Use the machine properties instead. Cc: qemu-ppc@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/ppc/spapr_vio.c')
-rw-r--r--hw/ppc/spapr_vio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
index 5d6c564..3cc9421 100644
--- a/hw/ppc/spapr_vio.c
+++ b/hw/ppc/spapr_vio.c
@@ -525,10 +525,10 @@ static void spapr_vio_busdev_realize(DeviceState *qdev, Error **errp)
uint32_t liobn = SPAPR_VIO_LIOBN(dev->reg);
memory_region_init(&dev->mrroot, OBJECT(dev), "iommu-spapr-root",
- ram_size);
+ MACHINE(spapr)->ram_size);
memory_region_init_alias(&dev->mrbypass, OBJECT(dev),
"iommu-spapr-bypass", get_system_memory(),
- 0, ram_size);
+ 0, MACHINE(spapr)->ram_size);
memory_region_add_subregion_overlap(&dev->mrroot, 0, &dev->mrbypass, 1);
address_space_init(&dev->as, &dev->mrroot, qdev->id);