qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] spapr: Enable use of huge pages
@ 2014-07-09  5:57 Alexey Kardashevskiy
  2014-07-09  7:38 ` Hu Tao
  2014-07-09  7:46 ` Paolo Bonzini
  0 siblings, 2 replies; 7+ messages in thread
From: Alexey Kardashevskiy @ 2014-07-09  5:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alexey Kardashevskiy, Paolo Bonzini, qemu-ppc, Alexander Graf,
	Hu Tao

0b183fc87 "memory: move mem_path handling to
memory_region_allocate_system_memory" disabled -mempath use for all
machines that do not use memory_region_allocate_system_memory() to
register RAM. Since SPAPR uses memory_region_init_ram(), the huge pages
support was disabled for it.

This replaces memory_region_init_ram()+vmstate_register_ram_global() with
memory_region_allocate_system_memory() to get huge pages back.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
 hw/ppc/spapr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index a23c0f0..8fa9f7e 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1337,8 +1337,8 @@ static void ppc_spapr_init(MachineState *machine)
         ram_addr_t nonrma_base = rma_alloc_size;
         ram_addr_t nonrma_size = spapr->ram_limit - rma_alloc_size;
 
-        memory_region_init_ram(ram, NULL, "ppc_spapr.ram", nonrma_size);
-        vmstate_register_ram_global(ram);
+        memory_region_allocate_system_memory(ram, NULL, "ppc_spapr.ram",
+                                             nonrma_size);
         memory_region_add_subregion(sysmem, nonrma_base, ram);
     }
 
-- 
2.0.0

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

end of thread, other threads:[~2014-07-10 10:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-09  5:57 [Qemu-devel] [PATCH] spapr: Enable use of huge pages Alexey Kardashevskiy
2014-07-09  7:38 ` Hu Tao
2014-07-09  7:46 ` Paolo Bonzini
2014-07-09 13:59   ` [Qemu-devel] [RFC PATCH v2] " Alexey Kardashevskiy
2014-07-09 14:02     ` Paolo Bonzini
2014-07-10 10:29     ` Alexander Graf
2014-07-10 10:45       ` Alexey Kardashevskiy

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).