From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWCI9-0008PD-5U for qemu-devel@nongnu.org; Wed, 17 Feb 2016 19:18:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWCI3-0004ah-DF for qemu-devel@nongnu.org; Wed, 17 Feb 2016 19:17:57 -0500 Date: Thu, 18 Feb 2016 11:08:33 +1100 From: David Gibson Message-ID: <20160218000833.GA20260@voom.redhat.com> References: <1455733399-4939-1-git-send-email-thuth@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline In-Reply-To: <1455733399-4939-1-git-send-email-thuth@redhat.com> Subject: Re: [Qemu-devel] [PATCH] hw/ppc/spapr: Halt CPU when powering off via RTAS call List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth Cc: drjones@redhat.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, agraf@suse.de --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 17, 2016 at 07:23:19PM +0100, Thomas Huth wrote: > The LoPAPR specification defines the following for the RTAS > power-off call: "On successful operation, does not return". > However, the implementation in QEMU currently returns and runs > the guest CPU again for some more cycles. This caused some > trouble with the new ppc implementation of the kvm-unit-tests > recently. So let's make sure that the QEMU implementation > follows the spec, thus stop the CPU to make sure that the > RTAS call does not return to the guest anymore. >=20 > Signed-off-by: Thomas Huth Applied to ppc-for-2.6, thanks. > --- > hw/ppc/spapr_rtas.c | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c > index 07ad672..b7c5ebd 100644 > --- a/hw/ppc/spapr_rtas.c > +++ b/hw/ppc/spapr_rtas.c > @@ -113,6 +113,7 @@ static void rtas_power_off(PowerPCCPU *cpu, sPAPRMach= ineState *spapr, > return; > } > qemu_system_shutdown_request(); > + cpu_stop_current(); > rtas_st(rets, 0, RTAS_OUT_SUCCESS); > } > =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 --ZPt4rx8FFjLCG7dd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWxQuBAAoJEGw4ysog2bOS7egQAJa6S/mtJ2xh9t8HuXeIvK8m 2Fh/ZlLxRLdjWk3j3mM+TJj2zHV31THbih1pFvLtG8MGwmndIsJDfr0I21PqdmiE Fgv1DaEUYTUfqvCtOxIoh4CNmwH4IipcqKqGumDtYkaCDfeolChGoVoeQdHz1h55 /5okfTburu54z5GzhsTMklpp4RXOVqGY+p68FT/JWgXVkiTXtQ8UK986fK29Xbkm 5Dth6lB1Nfy6CtCrV2dJovNl2guPWn/2Sfg7vZPQmlm9G/OmkxhcTPJlT3ubXtIs fzdvLPz+k3IjULpAnGYwri0m+8WLj219tuIRsY/AApymDM1JvNwm+lyDcxNyEfoc RDEQJspQypL8kI/CALqPhwsbBiLfyduOBkf2dcpH3A0mFLZ+rfWBcx3808XIWJrX KP9lvo0ql7l88K7GPZc+O5RpFtnUVHiMqTZl8hXk83QqWW0pyuCy9jkDxN8MBI2u aLUn54E4WdQRIRT6NfbR2z8rHx/GUZgAgsWmhcCtz0XFsmUgh3fP1GwMUC+NB2Np B7E2wNHyxqIh4yMhfOQ1CgfAotMiouHMwyvUzc7ss0kfujoDNPgkAqkbd/SWQZMM ZonyCtX0lqooV/KqXOu+yX72AliYTTzcoU8TDVDyDe48y3YqBHF4ISo32dZesohp yAjeQ7w35hZxDGVtxOMj =Dt1S -----END PGP SIGNATURE----- --ZPt4rx8FFjLCG7dd--