From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZexSu-0001Fw-Ro for qemu-devel@nongnu.org; Wed, 23 Sep 2015 23:45:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZexSp-0006iP-PT for qemu-devel@nongnu.org; Wed, 23 Sep 2015 23:45:00 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:47280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZexSp-0006hp-4z for qemu-devel@nongnu.org; Wed, 23 Sep 2015 23:44:55 -0400 Received: from /spool/local by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 24 Sep 2015 13:44:52 +1000 Date: Thu, 24 Sep 2015 09:13:58 +0530 From: Bharata B Rao Message-ID: <20150924034358.GF16381@in.ibm.com> References: <1442893189-5680-1-git-send-email-bharata@linux.vnet.ibm.com> <1442893189-5680-3-git-send-email-bharata@linux.vnet.ibm.com> <20150923032951.GV20331@voom.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150923032951.GV20331@voom.fritz.box> Subject: Re: [Qemu-devel] [RFC PATCH v0 2/2] spapr: Abort when HTAB of requested size isn't allocated Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: nfont@linux.vnet.ibm.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com On Wed, Sep 23, 2015 at 01:29:51PM +1000, David Gibson wrote: > On Tue, Sep 22, 2015 at 09:09:49AM +0530, Bharata B Rao wrote: > > Terminate the guest when HTAB of requested size isn't allocated by > > the host. > > > > When memory hotplug is attempted on a guest that has booted with > > less than requested HTAB size, the guest kernel will not be able > > to gracefully fail the hotplug request. This patch will ensure that > > we never end up in a situation where memory hotplug fails due to > > less than requested HTAB size. > > > > Signed-off-by: Bharata B Rao > > Reviewed-by: David Gibson > > > --- > > hw/ppc/spapr.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > > index 4692122..66446af 100644 > > --- a/hw/ppc/spapr.c > > +++ b/hw/ppc/spapr.c > > @@ -992,6 +992,10 @@ static void spapr_alloc_htab(sPAPRMachineState *spapr) > > > > if (shift > 0) { > > /* Kernel handles htab, we don't need to allocate one */ > > + if (shift != spapr->htab_shift) { > > + error_setg(&error_abort, "Failed to allocated requested HTAB size"); Do you think we should have a bit more verbose message here so that use knows what action to take after this abortion ? Like "Failed to allocate requested HTAB size, try with lower maxmem" Regards, Bharata.