From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSI3g-0007cB-Db for qemu-devel@nongnu.org; Wed, 27 Jul 2016 02:11:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSI3f-0002PA-3E for qemu-devel@nongnu.org; Wed, 27 Jul 2016 02:11:08 -0400 Date: Wed, 27 Jul 2016 16:11:03 +1000 From: David Gibson Message-ID: <20160727061103.GM17429@voom.fritz.box> References: <1469596482-4048-1-git-send-email-bharata@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rdbbj4JunmnVtKq/" Content-Disposition: inline In-Reply-To: <1469596482-4048-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH 1/1] spapr: Prevent boot CPU core removal List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bharata B Rao Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, imammedo@redhat.com --rdbbj4JunmnVtKq/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 27, 2016 at 10:44:42AM +0530, Bharata B Rao wrote: > Boot CPU is assumed to be always present in QEMU code. So > until that assumptions are gone, deny removal request. > In another words, QEMU won't support boot CPU core hot-unplug. >=20 > Signed-off-by: Bharata B Rao Applied to ppc-for-2.7, but I've changed the message slightly to avoid the ambiguity between: un-pluggable - "may not be plugged (or unplugged)" unplug-able - "may be unplugged" > --- > hw/ppc/spapr_cpu_core.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c > index 5a132bf..0dadf48 100644 > --- a/hw/ppc/spapr_cpu_core.c > +++ b/hw/ppc/spapr_cpu_core.c > @@ -133,6 +133,11 @@ void spapr_core_unplug(HotplugHandler *hotplug_dev, = DeviceState *dev, > sPAPRDRConnectorClass *drck; > Error *local_err =3D NULL; > =20 > + if (index =3D=3D 0) { > + error_setg(errp, "Boot CPU core is unpluggable"); > + return; > + } > + > g_assert(drc); > =20 > drck =3D SPAPR_DR_CONNECTOR_GET_CLASS(drc); --=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 --rdbbj4JunmnVtKq/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXmFB3AAoJEGw4ysog2bOSbOQP+QE/StxsIBj0K1ilGUo0z0gV 47U5eo25oXDUXa1vvtVzE6LMxvrcrO3mpeecBz0EBkV2ztG5EpTec/mk5PWD1gpX iTg1yOtDfICgt4evRtE0nKGVjEPJCY2oYgJKayr+v//FQ/FXO3FvwzR+Zi8BzBW9 DGxSmdxqEOnF1EZjdEc1IfaKN5sQJEbwTl+OU/Xh3sSeujHWUjrSTs4wHi6mQ9Hg WVtBtvpgHVZWzxWH3jV0m2NHB3UU8XyFjUmODfEb3k4kz9DxWrywPBbHP8T8ZpLO 0K0fiNT/a5gumNfElYlvnUwoo3TppFxT5gkNeEssnRH/n/5357vfj3T2g1PsNamk nCVlIUyuUVVHq0b4x7Pw2MRiANWFa3L0Gvs9CDUru8eKA7pdmquXGgVg7aq2Oyd5 NhdxMHfVW6FBn7bA+agTlLXp8YyM4p9gGFbrRjPnAmqjtiU+Wk2+0K3CfASS9jfU sOJJDRElGxgLShTSeWcx95FTkN0XdTcQELPvo1LOiX+kbh46CgbHtNzVCEZ/8CdX SkwGtKDkTJQggG55ZTt1y83YP1VjbgD2QKbo3F7x2ruNEKtlJ2HUbf0lQ0ETDhNG QSwY4s8wQP9YGN8pA4G72YHEXUfuyMd/UtVYz50HjVZE0DhHjNriFAfVaKefWqYI cWy252vRQ5hB+zR/Pdp8 =GPPq -----END PGP SIGNATURE----- --rdbbj4JunmnVtKq/--