From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5tNT-0004zs-Cw for qemu-devel@nongnu.org; Fri, 19 Jun 2015 06:18:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5tNP-0000gs-D1 for qemu-devel@nongnu.org; Fri, 19 Jun 2015 06:18:27 -0400 Received: from e28smtp05.in.ibm.com ([122.248.162.5]:58411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5tNO-0000gX-Nh for qemu-devel@nongnu.org; Fri, 19 Jun 2015 06:18:23 -0400 Received: from /spool/local by e28smtp05.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 19 Jun 2015 15:48:21 +0530 From: Bharata B Rao Date: Fri, 19 Jun 2015 15:47:56 +0530 Message-Id: <1434709077-17491-5-git-send-email-bharata@linux.vnet.ibm.com> In-Reply-To: <1434709077-17491-1-git-send-email-bharata@linux.vnet.ibm.com> References: <1434709077-17491-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH v4 4/5] spapr: Make hash table size a factor of maxram_size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aik@ozlabs.ru, Bharata B Rao , mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-ppc@nongnu.org, tyreld@linux.vnet.ibm.com, nfont@linux.vnet.ibm.com, imammedo@redhat.com, david@gibson.dropbear.id.au The hash table size is dependent on ram_size, but since with hotplug the memory can grow till maxram_size. Hence make hash table size dependent on maxram_size. This allows to hotplug huge amounts of memory to the guest. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 2389061..24e5a8c 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1689,7 +1689,7 @@ static void ppc_spapr_init(MachineState *machine) * more than needed for the Linux guests we support. */ spapr->htab_shift = 18; /* Minimum architected size */ while (spapr->htab_shift <= 46) { - if ((1ULL << (spapr->htab_shift + 7)) >= machine->ram_size) { + if ((1ULL << (spapr->htab_shift + 7)) >= machine->maxram_size) { break; } spapr->htab_shift++; -- 2.1.0