From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZM9eu-0004kS-Im for qemu-devel@nongnu.org; Mon, 03 Aug 2015 02:55:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZM9et-00058u-3p for qemu-devel@nongnu.org; Mon, 03 Aug 2015 02:55:40 -0400 Date: Mon, 3 Aug 2015 16:43:03 +1000 From: David Gibson Message-ID: <20150803064303.GA31111@voom.redhat.com> References: <1438580143-587-1-git-send-email-bharata@linux.vnet.ibm.com> <1438580143-587-2-git-send-email-bharata@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="C7zPtVaVf+AK4Oqc" Content-Disposition: inline In-Reply-To: <1438580143-587-2-git-send-email-bharata@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [RFC PATCH v0 1/5] spapr: Provide better error message when slots exceed max allowed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: mdroth@linux.vnet.ibm.com, nfont@linux.vnet.ibm.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de --C7zPtVaVf+AK4Oqc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 03, 2015 at 11:05:39AM +0530, Bharata B Rao wrote: > Currently when user specifies more slots than allowed max of > SPAPR_MAX_RAM_SLOTS (32), we error out like this: >=20 > qemu-system-ppc64: unsupported amount of memory slots: 64 >=20 > Let the user know about the max allowed slots like this: >=20 > qemu-system-ppc64: Specified number of memory slots 64 exceeds max suppor= ted 32 >=20 > Signed-off-by: Bharata B Rao So, this is good as far as it goes. There's another problem here though. At present even requesting 32 slots will not work properly, because KVM only supports 32 slots and a couple of those are already used for the non-hotplug RAM. I think fixing this requires a kernel change to advertise the available KVM memory slots. > --- > hw/ppc/spapr.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index 6e24bf9..6d9cbd9 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -1777,8 +1777,8 @@ static void ppc_spapr_init(MachineState *machine) > ram_addr_t hotplug_mem_size =3D machine->maxram_size - machine->= ram_size; > =20 > if (machine->ram_slots > SPAPR_MAX_RAM_SLOTS) { > - error_report("unsupported amount of memory slots: %"PRIu64, > - machine->ram_slots); > + error_report("Specified number of memory slots %"PRIu64" exc= eeds max supported %d\n", > + machine->ram_slots, SPAPR_MAX_RAM_SLOTS); > exit(EXIT_FAILURE); > } > =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 --C7zPtVaVf+AK4Oqc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVvw13AAoJEGw4ysog2bOSJasP/i/fAwGQVJUBXpwVr/uEMGlI JkVPZvEsz2svjcu/4NgabOXKxI/s2Gp+aC9ykNbhEuFP05XANQ4F4V2cBFEOV8BT kcVK0wADjG4Q7IJCYhMBSM52rvTVSnPnTlJ+GFNp8mTEQk4l+mpG5Mn/zfNwRrYk kyMqZERIwQtC5RYvy1ExJiMiGaTRdUlmALKBRJHM17WC8tMw9ccsn2zWRIUwfOVm elt5lLBVVAEqKZ7j3u4gG+jWhujFo6QHEjT7RaXbF/gVOrTCwAl386fU5lkw13uK 8oNdE/NcbTkZKYPv64GiJ9hEu8g1ooklBCMp2bzUL0SJ0Jp4kO3y06ATUtoZ0hKq MHUChiHK5o7q2oqYaZ4nrUTrEwl7OJuC2zlVSz4lraq33nnGHFhY7VHW5deWFAE5 FCRBKWL9/c74FProNm+Ev2Z/Y64LLpZmpPpPKBkxBE+25XVLflY/OFpnaD8L0JL2 sKHQ+UjX8d+7EMu/VPPDPfcZgi3IciZzWNIa6p8qgOelF4DeLDmufviiG3rfYxiV VqOUIHcT1YgAyzC4D9QHyG1KhmiY3PtNPJGLAL1g1cNoc6PtDLsfPiZeic+S88YI gEOFY74bMFfwQEIy+dbk5kEoNsIwGIfIZ2hPu5BvnCF/oyDMl6UVHLcDmKLXy9Gz YkA3IaYjAAFMXJbAsH5u =yZ31 -----END PGP SIGNATURE----- --C7zPtVaVf+AK4Oqc--