From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4lnb-0001TX-9X for qemu-devel@nongnu.org; Wed, 09 Jul 2014 02:56:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4lnP-0004lJ-Mz for qemu-devel@nongnu.org; Wed, 09 Jul 2014 02:56:15 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:48244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4lnG-0004j2-QC for qemu-devel@nongnu.org; Wed, 09 Jul 2014 02:56:03 -0400 Received: from /spool/local by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 9 Jul 2014 16:46:32 +1000 From: Alexey Kardashevskiy Date: Wed, 9 Jul 2014 15:57:52 +1000 Message-Id: <1404885472-23563-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH] spapr: Enable use of huge pages List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Paolo Bonzini , qemu-ppc@nongnu.org, 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 Cc: Hu Tao Signed-off-by: Alexey Kardashevskiy --- 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