From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z80Rd-0005XO-N1 for qemu-devel@nongnu.org; Thu, 25 Jun 2015 02:15:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z80Ra-00077d-GV for qemu-devel@nongnu.org; Thu, 25 Jun 2015 02:15:29 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:50140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z80RZ-000749-Rh for qemu-devel@nongnu.org; Thu, 25 Jun 2015 02:15:26 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 25 Jun 2015 16:15:23 +1000 From: Bharata B Rao Date: Thu, 25 Jun 2015 11:44:13 +0530 Message-Id: <1435212855-21685-5-git-send-email-bharata@linux.vnet.ibm.com> In-Reply-To: <1435212855-21685-1-git-send-email-bharata@linux.vnet.ibm.com> References: <1435212855-21685-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v5 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 , 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 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 aee8156..0ab78fa 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1697,7 +1697,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