From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeER7-0002Sv-Tc for qemu-devel@nongnu.org; Mon, 21 Sep 2015 23:40:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeER0-00022n-L7 for qemu-devel@nongnu.org; Mon, 21 Sep 2015 23:40:09 -0400 Received: from e28smtp09.in.ibm.com ([122.248.162.9]:59576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeEQz-0001xc-Sg for qemu-devel@nongnu.org; Mon, 21 Sep 2015 23:40:02 -0400 Received: from /spool/local by e28smtp09.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 22 Sep 2015 09:09:58 +0530 From: Bharata B Rao Date: Tue, 22 Sep 2015 09:09:47 +0530 Message-Id: <1442893189-5680-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH v0 0/2] spapr: Abort when HTAB size requirement can't be met List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: nfont@linux.vnet.ibm.com, Bharata B Rao , qemu-ppc@nongnu.org, mdroth@linux.vnet.ibm.com, david@gibson.dropbear.id.au HTAB size is a factor of maximum memory size that is specified by maxmem= command line option. In cases where there is shortage of host memory, host will not be able to allocate contiguous memory for guest HTAB and will instead allocate a smaller HTAB. This usually is not a problem but when user starts hotplugging memory to the guest, we can run out of HTAB entries and hence memory hotplug fails. This failure should have been handled gracefully by the guest kernel, but currently it leads to guest kernel OOPS. This will eventually get fixed when the handling of memory hotplug is completely moved to kernel for PowerKVM. Prevent such kernel failure by refusing to boot the guest when requested HTAB size can't be allocated. However HTAB allocation happens in the reset path from where it is too late to abort. Hence this patchset moves the HTAB allocation to machine init and aborts if HTAB size requirement isn't met. Two previous related attempts to address this problem: 1. http://lists.nongnu.org/archive/html/qemu-devel/2015-07/msg03325.html Aborts the guest from the reset path - not desirable. 2. https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg02602.html Silently disables memory hotplug - not desirable. This patchset applies against David Gibson's spapr-next. Bharata B Rao (2): spapr: Allocate HTAB from machine init spapr: Abort when HTAB of requested size isn't allocated hw/ppc/spapr.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) -- 2.1.0