From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9UhH-0003F0-Hv for qemu-devel@nongnu.org; Mon, 29 Jun 2015 04:45:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9UhD-0007LW-1s for qemu-devel@nongnu.org; Mon, 29 Jun 2015 04:45:47 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:34816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9UhC-0007L5-Fg for qemu-devel@nongnu.org; Mon, 29 Jun 2015 04:45:43 -0400 Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 29 Jun 2015 18:45:39 +1000 From: Bharata B Rao Date: Mon, 29 Jun 2015 14:14:30 +0530 Message-Id: <1435567472-20338-5-git-send-email-bharata@linux.vnet.ibm.com> In-Reply-To: <1435567472-20338-1-git-send-email-bharata@linux.vnet.ibm.com> References: <1435567472-20338-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v6 4/6] 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 , agraf@suse.de, mdroth@linux.vnet.ibm.com, 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 Reviewed-by: David Gibson --- 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 8ab8df5..2ee4515 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1706,7 +1706,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