From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj1FG-0007MQ-3Y for qemu-devel@nongnu.org; Mon, 05 Oct 2015 04:35:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zj1FC-00006u-2t for qemu-devel@nongnu.org; Mon, 05 Oct 2015 04:35:42 -0400 Received: from e28smtp07.in.ibm.com ([122.248.162.7]:44106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj1FB-000055-BO for qemu-devel@nongnu.org; Mon, 05 Oct 2015 04:35:38 -0400 Received: from /spool/local by e28smtp07.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 5 Oct 2015 14:05:34 +0530 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 779D8394005A for ; Mon, 5 Oct 2015 14:05:31 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay05.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t958ZReY58458184 for ; Mon, 5 Oct 2015 14:05:27 +0530 Received: from d28av03.in.ibm.com (localhost [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t958ZQO1027597 for ; Mon, 5 Oct 2015 14:05:27 +0530 From: Bharata B Rao Date: Mon, 5 Oct 2015 14:05:23 +0530 Message-Id: <1444034124-28747-2-git-send-email-bharata@linux.vnet.ibm.com> In-Reply-To: <1444034124-28747-1-git-send-email-bharata@linux.vnet.ibm.com> References: <1444034124-28747-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: [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: qemu-devel@nongnu.org Cc: imammedo@redhat.com, Bharata B Rao , david@gibson.dropbear.id.au 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; memory_region_init(&spapr->hotplug_memory.mr, OBJECT(spapr), "hotplug-memory", hotplug_mem_size); memory_region_add_subregion(sysmem, spapr->hotplug_memory.base, -- 2.1.0