From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zext6-0000V9-Mc for qemu-devel@nongnu.org; Thu, 24 Sep 2015 00:12:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zext5-0003FH-Ph for qemu-devel@nongnu.org; Thu, 24 Sep 2015 00:12:04 -0400 Date: Thu, 24 Sep 2015 14:12:22 +1000 From: David Gibson Message-ID: <20150924041222.GQ15944@voom.fritz.box> 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> <20150924034358.GF16381@in.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uRjmd8ppyyws0Tml" Content-Disposition: inline In-Reply-To: <20150924034358.GF16381@in.ibm.com> Subject: Re: [Qemu-devel] [RFC PATCH v0 2/2] spapr: Abort when HTAB of requested size isn't allocated List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: nfont@linux.vnet.ibm.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com --uRjmd8ppyyws0Tml Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 24, 2015 at 09:13:58AM +0530, Bharata B Rao wrote: > 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. > > >=20 > > > 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. > > >=20 > > > Signed-off-by: Bharata B Rao > >=20 > > Reviewed-by: David Gibson > >=20 > > > --- > > > hw/ppc/spapr.c | 4 ++++ > > > 1 file changed, 4 insertions(+) > > >=20 > > > 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) > > > =20 > > > if (shift > 0) { > > > /* Kernel handles htab, we don't need to allocate one */ > > > + if (shift !=3D spapr->htab_shift) { > > > + error_setg(&error_abort, "Failed to allocated requested = HTAB size"); >=20 > Do you think we should have a bit more verbose message here so that > use knows what action to take after this abortion ? Like >=20 > "Failed to allocate requested HTAB size, try with lower maxmem" Uh, yeah, I guess that's better. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --uRjmd8ppyyws0Tml Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWA3gmAAoJEGw4ysog2bOSZ2QQAOH39A3Hg009Xv1lUqvQTl6u JZ0L0CZdXcfPzqSR16pV0gvLvx11InJoecTn/7VCTr9q511A4BmWgGOsXvwB5+Of T9VhcVoUPAGZ2JujcWLDWxVPFcXY0PmhelDkPGcrwSbL0bZOT9Q1EWEfhphi9+mL z5xzCL9fSUGy880RsjVg+4cj1YFpzyWj9iqjANfbHn4YsfqvZdgQOIakRXthKM54 0AfM8gwvSJLivPQcrOTrRPGRGfxmgwJ+9t7nVJp26IAZo9b7qDxRWzdUJMEohPxI IJfQNV1xMKR9hUUtE7ObDMHfXZD6q4YAWL/TwLl4IYO/6luGWYl5bvAjLGb/PPhv 4f7Tehzj7F5lt9gHRfmJJJMLKTvYQybd1ow3RK0D8QSfMXEonJ+lQCc9X1tO04+6 S3QEWjwZmJM2RREmiMicjF+rUcDmIUlfRPVMVvaBydIPFmyHlRrOrbprK2zkiPxl OaSggoV2Wl2GmoxrKXow8MprBumN2dA0ZEJeuT1KnWFlS1iNYSCF/BMnagxEsJHO k6Ao+zEccBkn/QUuuF4sNMkNYFQ0v3+iuplBzcx5h48S0u7F9iGjz46w0580TcNr N/8NJaPJj2JDbYnU2brk4sSBwQrKarKEsc2/7rnrz+ivH1KnzsKewNzWXuwVpGWv RjYgGJmkiRV/0v/BbtCX =dIpz -----END PGP SIGNATURE----- --uRjmd8ppyyws0Tml--