From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bEnFh-0000Bj-GU for qemu-devel@nongnu.org; Sun, 19 Jun 2016 20:39:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bEnFe-0006UV-Ba for qemu-devel@nongnu.org; Sun, 19 Jun 2016 20:39:44 -0400 Date: Mon, 20 Jun 2016 10:22:46 +1000 From: David Gibson Message-ID: <20160620002246.GK7790@voom.fritz.box> References: <1466363964-21378-1-git-send-email-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="huBJOJF9BsF479P6" Content-Disposition: inline In-Reply-To: <1466363964-21378-1-git-send-email-laurent@vivier.eu> Subject: Re: [Qemu-devel] [PATCH] ppc64: disable gen_pause() for linux-user mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Benjamin Herrenschmidt --huBJOJF9BsF479P6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 19, 2016 at 09:19:24PM +0200, Laurent Vivier wrote: > While trying to install a fedora container with > "lxc-create -t fedora -- -I qemu-ppc64" the installation abort with > the following error: >=20 > qemu: fatal: Unknown exception 0x65537. Aborting >=20 > NIP 0000004000927924 LR 00000040009e325c CTR 0000004000927480 XER 00000= 00000000000 CPU#0 > MSR 9000000102806000 HID0 0000000000000000 HF 9000000002806000 iidx 3 di= dx 3 > TB 00248932 1069155773327487 > GPR00 00000040009e325c 00000040007ff800 0000004000aba098 0000000000000000 > GPR04 00000040007ff878 0000004000dcb588 0000004000dcb830 0000004000a7a098 > GPR08 0000000000000000 0000000000000000 00000040007ff878 0000004000927960 > GPR12 0000000022022448 0000004000e2aef0 0000000000000000 0000000000000000 > GPR16 0000000000000000 0000000000000000 0000000000000002 0000000000000001 > GPR20 0000000000000000 0000000000000000 0000000000000000 0000004000800699 > GPR24 0000004000e13320 0000000000000000 0000004000ac9ad8 0000004000ac9ae0 > GPR28 0000000000000001 00000000100210a0 0000000000000000 0000000000000038 > CR 22022442 [ E E - E E G G E ] RES ffffffffffffffff > FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000 > FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000 > FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000 > FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000 > FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000 > FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000 > FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000 > FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000 > FPSCR 0000000000000000 > /usr/share/lxc/templates/lxc-fedora: line 487: 26661 Aborted = (core dumped) chroot . yum -y --nogpgcheck --installroot /run/install i= nstall python rpm yum >=20 > I've bisected until the commit: >=20 > commit b68e60e6f0d2865e961a800fb8db96a7fc6494c4 > Author: Benjamin Herrenschmidt > Date: Tue May 3 18:03:33 2016 +0200 >=20 > ppc: Get out of emulation on SMT "OR" ops >=20 > Otherwise tight loops at smt_low for example, which OPAL does, > eat so much CPU that we can't boot a kernel anymore. With that, > I can boot 8 CPUs just fine with powernv. >=20 > Signed-off-by: Benjamin Herrenschmidt > Reviewed-by: David Gibson > Signed-off-by: David Gibson >=20 > We can fix that by preventing to send EXCP_HLT in the case of linux-user = mode, > as the main loop doesn't know how to manage it. Applied to ppc-for-2.7 >=20 > Signed-off-by: Laurent Vivier > --- > target-ppc/translate.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > index 30dc76a..07b7e64 100644 > --- a/target-ppc/translate.c > +++ b/target-ppc/translate.c > @@ -1393,7 +1393,7 @@ GEN_LOGICAL2(nand, tcg_gen_nand_tl, 0x0E, PPC_INTEG= ER); > /* nor & nor. */ > GEN_LOGICAL2(nor, tcg_gen_nor_tl, 0x03, PPC_INTEGER); > =20 > -#if defined(TARGET_PPC64) > +#if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY) > static void gen_pause(DisasContext *ctx) > { > TCGv_i32 t0 =3D tcg_const_i32(0); > @@ -1481,7 +1481,9 @@ static void gen_or(DisasContext *ctx) > /* Pause us out of TCG otherwise spin loops with smt_low > * eat too much CPU and the kernel hangs > */ > +#if !defined(CONFIG_USER_ONLY) > gen_pause(ctx); > +#endif > } > #endif > } --=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 --huBJOJF9BsF479P6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXZzdWAAoJEGw4ysog2bOSHWsP/2wg0uC3gJIZSxohW/ffQW7c NM0p7MmqAHri3TGrwMaDQQThiYL0zUhF2lHwaWzayhUq3/qZiz+8C7n5bkbsZd7G n3KK2FQtsilEPF8yYO79k0W0JOBN6C55jzIdFYcE3h66yMEJxL7Q1ziT5BdR14y2 OCI9/BVB951Uko3UmbEw0kQayQLwCXNb1VY+fp0OcbK0nGswfFDow7bUccwPL3TF StmVnOpdtytaM0a/dAIh64XtoTLoZwoZig+Cth4OkDOAVzP6kaDL2QvLyY5w52KH IrtpMB7yRD4fqQCkK4UrAdph4iML0o8eQoDNAUbwZuB4peZ/lNZ31vMtH8mYextF 9ygp26B3MvgiFu5J1Zm1WEwyoGOEKyhn3UGBkqhwY/hYwF13qAcIDAubRQqLZ79V Pil1RHof8reHEPkP9IpYemXILf+XtoTMyLLgm0t4+/x4YbYY3/P4QpPK7FEB+1Pi GU9jJHmSbfTp/HTvt1tiFmqVRsMv/vM4uqT0hGbSLrRJwRVbl3OTor6B5J8NoIIz P6VO6DdKrjwhrsSTIQugZ90JqjjnPBg++1QY7tXFyejlI8zO3yxPesQTCubsE2nc Ub4zyrQ2SZaCaldG4H2u6YBrEP9xL8+285bktVAGb8KMJ0MwFCwSNrnbYZzgsRLq QgApkqOqTqulG6S5/bgT =m8ZN -----END PGP SIGNATURE----- --huBJOJF9BsF479P6--