qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hw/arm/virt: Replace memory_region_init_ram with memory_region_allocate_system_memory
@ 2014-10-14  2:36 zhuyijun
  2014-10-14  4:54 ` Peter Maydell
  0 siblings, 1 reply; 10+ messages in thread
From: zhuyijun @ 2014-10-14  2:36 UTC (permalink / raw)
  To: qemu-devel, peter.maydell; +Cc: hangaohuai, peter.huangpeng, Zhu Yijun

From: Zhu Yijun <zhuyijun@huawei.com>

Commit 0b183fc871:"memory: move mem_path handling to
memory_region_allocate_system_memory" split memory_region_init_ram and
memory_region_init_ram_from_file. Also it moved mem-path handling a step
up from memory_region_init_ram to memory_region_allocate_system_memory.

Therefore for any board that uses memory_region_init_ram directly,
-mem-path is not supported.

Commit e938ba0c35:"ppc: memory: Replace memory_region_init_ram with
memory_region_allocate_system_memory" have already fixed this on ppc.

arm/arm64 board also occurs, this patch is only for arm64 board(virt).

Signed-off-by: Zhu Yijun <zhuyijun@huawei.com>
---
 hw/arm/virt.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 8c6b171..32646a1 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -580,9 +580,8 @@ static void machvirt_init(MachineState *machine)
     fdt_add_cpu_nodes(vbi);
     fdt_add_psci_node(vbi);
 
-    memory_region_init_ram(ram, NULL, "mach-virt.ram", machine->ram_size,
-                           &error_abort);
-    vmstate_register_ram_global(ram);
+    memory_region_allocate_system_memory(ram, NULL, "mach-virt.ram",
+                                         machine->ram_size);
     memory_region_add_subregion(sysmem, vbi->memmap[VIRT_MEM].base, ram);
 
     create_flash(vbi);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-10-17 12:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-14  2:36 [Qemu-devel] [PATCH] hw/arm/virt: Replace memory_region_init_ram with memory_region_allocate_system_memory zhuyijun
2014-10-14  4:54 ` Peter Maydell
2014-10-14  5:10   ` Paolo Bonzini
2014-10-14  5:42     ` Peter Maydell
2014-10-14 12:39       ` Paolo Bonzini
2014-10-14 12:48         ` Peter Maydell
2014-10-17 12:05           ` Paolo Bonzini
2014-10-14  6:04   ` Yijun Zhu
2014-10-14 12:40     ` Paolo Bonzini
2014-10-15  0:40       ` Yijun Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).