Received: from eggs.gnu.org ([2001:4830:134:3::10]:44000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj1hu-0000tp-R5 for qemu-devel@nongnu.org; Mon, 05 Oct 2015 05:05:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zj1ho-0005WA-Ql for qemu-devel@nongnu.org; Mon, 05 Oct 2015 05:05:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48722) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj1ho-0005UY-L5 for qemu-devel@nongnu.org; Mon, 05 Oct 2015 05:05:12 -0400 Date: Mon, 5 Oct 2015 11:05:07 +0200 From: Igor Mammedov Message-ID: <20151005110507.213a8314@nial.brq.redhat.com> In-Reply-To: <1444034124-28747-2-git-send-email-bharata@linux.vnet.ibm.com> References: <1444034124-28747-1-git-send-email-bharata@linux.vnet.ibm.com> <1444034124-28747-2-git-send-email-bharata@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v0 1/2] spapr: Accommadate alignment gaps in hotplug memory region List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: qemu-devel@nongnu.org, david@gibson.dropbear.id.au On Mon, 5 Oct 2015 14:05:23 +0530 Bharata B Rao wrote: > Size hotplug memory region assuming a 256MB max alignment every slot. > > Signed-off-by: Bharata B Rao > --- > hw/ppc/spapr.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index fc5e7d6..2ec509b 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -1792,6 +1792,9 @@ static void ppc_spapr_init(MachineState *machine) > > spapr->hotplug_memory.base = ROUND_UP(machine->ram_size, > SPAPR_HOTPLUG_MEM_ALIGN); > + > + /* size hotplug region assuming 256M max alignment per slot */ > + hotplug_mem_size += SPAPR_MEMORY_BLOCK_SIZE * machine->ram_slots; Does target support hugepages backend? If it does then adjustment probably should be max supported hugepage alignment. > memory_region_init(&spapr->hotplug_memory.mr, OBJECT(spapr), > "hotplug-memory", hotplug_mem_size); > memory_region_add_subregion(sysmem, spapr->hotplug_memory.base,