From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37583) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZecSc-0001Wf-K2 for qemu-devel@nongnu.org; Wed, 23 Sep 2015 01:19:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZecSb-00086C-MO for qemu-devel@nongnu.org; Wed, 23 Sep 2015 01:19:18 -0400 Date: Wed, 23 Sep 2015 13:29:51 +1000 From: David Gibson Message-ID: <20150923032951.GV20331@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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="finhkSr2yyrWw3ow" Content-Disposition: inline In-Reply-To: <1442893189-5680-3-git-send-email-bharata@linux.vnet.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 --finhkSr2yyrWw3ow Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 Reviewed-by: David Gibson > --- > 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 *spap= r) > =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"); > + } > + > spapr->htab_shift =3D shift; > kvmppc_kern_htab =3D true; > =20 --=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 --finhkSr2yyrWw3ow Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWAhyvAAoJEGw4ysog2bOSOAsP/2euCNPLebjd/dujp4PKjMBM P5bEBnIa5T3D8i85G9PZdoGBaopzOzznD4Bj2nkUUl+3pIOPqJOc1AcfO4sxyQDI sI1sm1rvMk5mQbpyzw+WYI/BQpUGdy5M4ReQxjF2OXGDIM7M1bvH4OTRKV0OW4+D 8aPDKXp8SjNElX1v0L/mfOQJDv/chUtamEGaey5HmwXoSgyJ9LvJk+ROifK43+uB QnAQ2BjJmMIzbFfACrT++coNOiM3FiXVgEgEtntTNKQeKfXWQUkztGYbrf2OyQ/2 5oWhGZWUqU2DL3xfTMaVApcnSDTY0tNAFiUy5263T5WtUFg4rZbVuTueP7DdGHPW FsLMmrcRAPEhI+ZXnclniJoWsX/0BD8KYdQnpXadm89XEyEC+vpoZRQi7vePjyCH p7YZIVWOR3CzCmpY6avEsGvpJFWWRvlUHR44PsgtLSm3x5AySQvuelcibYxMWxTw 2xkRVi/kSZb4/frXUEl2z+Wt5Rb1uCP2OdcCfsqWcWrhFf61lX+KWHEJ30/melw/ USEMsiaw0XN6ZfPQDvo0/ivZx2EeinTnk5wfvaMsV0c3OtlDWILeb7bAomdRikuI xeJDjqHISbvpV94cVbmG0EXtfsl3xzaPj9ulHr7/f+cfbEYnGgPxQTPmiFXII5x7 6a61oh1krK0/lutN/nD0 =HmPy -----END PGP SIGNATURE----- --finhkSr2yyrWw3ow--