From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3Zxy-00074P-MA for qemu-devel@nongnu.org; Mon, 30 Nov 2015 20:42:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3Zxu-00019C-KM for qemu-devel@nongnu.org; Mon, 30 Nov 2015 20:42:50 -0500 Date: Tue, 1 Dec 2015 11:37:03 +1100 From: David Gibson Message-ID: <20151201003703.GH24766@voom.redhat.com> References: <1448024079-20808-1-git-send-email-bharata@linux.vnet.ibm.com> <1448024079-20808-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="OgApRN/oydYDdnYz" Content-Disposition: inline In-Reply-To: <1448024079-20808-2-git-send-email-bharata@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v5 01/10] vl: Don't allow CPU toplogies with partially filled cores List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: mdroth@linux.vnet.ibm.com, aik@ozlabs.ru, agraf@suse.de, qemu-devel@nongnu.org, pbonzini@redhat.com, qemu-ppc@nongnu.org, tyreld@linux.vnet.ibm.com, nfont@linux.vnet.ibm.com, imammedo@redhat.com, afaerber@suse.de --OgApRN/oydYDdnYz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 20, 2015 at 06:24:30PM +0530, Bharata B Rao wrote: > Prevent guests from booting with CPU topologies that have partially > filled CPU cores or can result in partially filled CPU cores after > CPU hotplug like >=20 > -smp 15,sockets=3D1,cores=3D4,threads=3D4,maxcpus=3D16 or > -smp 15,sockets=3D1,cores=3D4,threads=3D4,maxcpus=3D17. >=20 > Signed-off-by: Bharata B Rao Reviewed-by: David Gibson I may have missed a bit of the discussion leading up to this. What was the rationale for still allowing partially filled sockets (and otherwise doing things at core rather than socket level?) > --- > vl.c | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > diff --git a/vl.c b/vl.c > index 7d993a5..23a1a1e 100644 > --- a/vl.c > +++ b/vl.c > @@ -1248,6 +1248,15 @@ static void smp_parse(QemuOpts *opts) > exit(1); > } > =20 > + if (cpus % threads || max_cpus % threads) { > + error_report("cpu topology: " > + "sockets (%u) cores (%u) threads (%u) with " > + "smp_cpus (%u) maxcpus (%u) " > + "will result in partially filled cores", > + sockets, cores, threads, cpus, max_cpus); > + exit(1); > + } > + > smp_cpus =3D cpus; > smp_cores =3D cores > 0 ? cores : 1; > smp_threads =3D threads > 0 ? threads : 1; --=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 --OgApRN/oydYDdnYz Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWXOuvAAoJEGw4ysog2bOS7eMP/ReYWbOEg/2ZEMY5Wa8uQ7rM WTVSw6U0G/z0/EtoSJzywT+50+8efnpmYC4qhSDvAU6p5fyGT4D8h3nuQuMEV0+o c3pGebPiJsPx0F+qDRVnmOLsq5LZ4pTtm2FbgrG4epJMjGMqUyb53sAZ5KvOi3id N6NNAKyDVQ/Xf1OyIN1zFZXlsGEIcDaTt6kTABey8qqtNU3mPV21qjYeHTHxc8/o sXNzEk4ZyY6xpTOMOW7/OsTVrfzpx2P2yuzE8hmv4SGTJL3Bttlu/GT3b7yaQj9X gY4rgmBf28cPEwHIIjZkooUaXsaXvISzHU/I0DXiTLp0lE15F/HbxjKr3C2/7jV7 RByztsBlQpdS8GgHAQ5wDgHa2E9w3xI5QoQ+zp4si4w8tNjtEeGf9VIJ3lSKPA1C dBF3ofTqwNPw54uRehxN+cwjFQQZFo+5reGFM8UtNKQo8RN0FYbBhDGwTFsU+IO7 rLYpnkl8qAIB6MuHtgqNllKK+hhhZpVonN8kduhb1rfJVOPQLScDeZLBPB7swf6C zqk1E/27oSLTegjvVdW5fOZjIcS/WWOscNWF1r9N3uDO7S/ToYEH6Er1nWccGSMp tlbUtWdS3BZcmAty4K5rJO7SJoHagKzxd5VPESDdn/T4I+Hm3PD82+9AnWWZfj65 G7TsvFcQoJXHrQzu7A8N =qSoY -----END PGP SIGNATURE----- --OgApRN/oydYDdnYz--