From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmaFP-0002Cb-PP for qemu-devel@nongnu.org; Wed, 21 Sep 2016 01:39:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmaFL-0001CN-Mb for qemu-devel@nongnu.org; Wed, 21 Sep 2016 01:39:06 -0400 Date: Wed, 21 Sep 2016 15:31:00 +1000 From: David Gibson Message-ID: <20160921053100.GZ20488@umbus> References: <1474433280-25652-1-git-send-email-bharata@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="odUccfZnqCGldi4C" Content-Disposition: inline In-Reply-To: <1474433280-25652-1-git-send-email-bharata@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [RFC PATCH v0] spapr: Disable CPU unplug in TCG mode 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 --odUccfZnqCGldi4C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 21, 2016 at 10:18:00AM +0530, Bharata B Rao wrote: > CPU unplug doesn't work in TCG mode currently and causes frequent system > freeze. In addition to other potential problems, the main problem arises > of out the requirement to support synchronous removal of a CPU thread. > The CPU thread that performs the cleanup of the unplugged CPU, kicks and > waits for the unplugged CPU thread to finish. This wait never finishes in > TCG mode when the waiting thread and the unplugged CPU thread are one and > the same. >=20 > So wait till proper MTTCG support is available before enabling > CPU unplug in TCG mode. MTTCG seems like a very big hammer to fix this with. Surely we could come up with a simpler interlock that would work for TCG in the meantime. >=20 > Signed-off-by: Bharata B Rao > --- > hw/ppc/spapr.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index ca77bb0..d7864c6 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -2300,6 +2300,10 @@ static void spapr_machine_device_unplug(HotplugHan= dler *hotplug_dev, > error_setg(errp, "CPU hot unplug not supported on this machi= ne"); > return; > } > + if (!kvm_enabled()) { > + error_setg(errp, "CPU hot unplug not supported in TCG mode"); > + return; > + } > spapr_core_unplug(hotplug_dev, dev, errp); > } > } --=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 --odUccfZnqCGldi4C Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX4hsUAAoJEGw4ysog2bOSZKoQALagWOptD1NGwWx1NcXWh79i qakF+Gy3icQUIn3smIdPLjmaDiI/NChLSz5CaaqAyna8Ks7Wqnza0htlGRtqN8+Z Wn1D1yZJYV74y7UxFlnhNC0tv/02FkzWAoLFrC2fkwQmhg6zY3HaVrFpJYxHCq8c N3BXp56X7U34xVvyokjljQ5w6R2t8rtGoyG5HmJp60XgiKamvU3+rTpDMa2CVzV6 sODPWpXMnMj1VVRs2b0J5r7oSilQrkhQKfT9Dn+FPeE/JXmFiNUwXebnIfqY8Itd EM3naIAyIyeJCE3us7nD1c96NRB45ip0R7bIw/yC5yl3Tp4HWuQPRUedYNASmdtW CMwuoFejmciNfummt4vw8mAwmRE1pWzDY1q/Oc4UPletgsmZDVr51DPE7IBbkor0 3ZjYjEaDLsOhCKjCAvlix1Aauz9p5/TdHhDUL9Gl4swgvqC04a5fxg32Q7Ap9Gh+ z/B0XpJ3z5CnApHwVkccrkdu0+jP5EdIJ//keiXj131Ye6VxfXg9AQvdhkTIRYKs iWZEny61/1EIL7Z7PD4AUTnQ/QUYsTPkAk0+wQq19pStEt4h2VEv9KThusDXQdAx U3V0/jtRVPNy61wgijb+sJpkKpw+Uo5Uir/1zOvvD0XS51y06xCGSamoL+VsVbwt bya1Og4ZNT1fYP4EKp7f =xCE3 -----END PGP SIGNATURE----- --odUccfZnqCGldi4C--