[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH] spapr: Enable use of huge pages
From: |
Hu Tao |
Subject: |
Re: [Qemu-ppc] [PATCH] spapr: Enable use of huge pages |
Date: |
Wed, 9 Jul 2014 15:38:28 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Jul 09, 2014 at 03:57:52PM +1000, Alexey Kardashevskiy wrote:
> 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 <address@hidden>
> Cc: Hu Tao <address@hidden>
> Signed-off-by: Alexey Kardashevskiy <address@hidden>
> ---
> 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
Reviewed-by: Hu Tao <address@hidden>
I had a patch that did this change for all boards:
http://lists.nongnu.org/archive/html/qemu-devel/2014-03/msg04982.html.
but incremental changes are OK to me.
Regards,
Hu