From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bd13P-0001BP-D5 for qemu-devel@nongnu.org; Thu, 25 Aug 2016 16:15:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bd13N-0001s4-2C for qemu-devel@nongnu.org; Thu, 25 Aug 2016 16:15:10 -0400 References: <4a78a3a5-91ba-b3bd-a59c-d1ebf9f1470b@reactos.org> <1472088691.2246.62.camel@kernel.crashing.org> <1472103184.2246.77.camel@kernel.crashing.org> From: =?UTF-8?Q?Herv=c3=a9_Poussineau?= Message-ID: <703193e4-41be-eb33-d420-65d6043a2083@reactos.org> Date: Thu, 25 Aug 2016 22:14:54 +0200 MIME-Version: 1.0 In-Reply-To: <1472103184.2246.77.camel@kernel.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] ppc: regression in 2.7.0-rc3 on rfi/rfid/hrfi instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt , qemu-devel , "qemu-ppc@nongnu.org" Le 25/08/2016 =C3=A0 07:33, Benjamin Herrenschmidt a =C3=A9crit : > On Thu, 2016-08-25 at 11:31 +1000, Benjamin Herrenschmidt wrote: >> >> Interesting, the problem is only with 603, not 604. I think I might >> have broken something with the 603 SW TLB loading stuff which is >> a bit weird, I'll have a look. Thanks. > > This fixes it to some extent... It gets to "press enter to activate > this console" but from there things don't work properly unless I > emulate a 604. I suspect there are still issues with the 603 SW > TLB mode. > > --- a/target-ppc/excp_helper.c > +++ b/target-ppc/excp_helper.c > @@ -959,8 +959,13 @@ static inline void do_rfi(CPUPPCState *env, target= _ulong nip, target_ulong msr) > { > CPUState *cs =3D CPU(ppc_env_get_cpu(env)); > > - /* MSR:POW cannot be set by any form of rfi */ > - msr &=3D ~(1ULL << MSR_POW); > + /* These bits cannot be set by RFI on non-BookE systems and so mus= t > + * be filtered out. 6xx and 7xxx with SW TLB management will put > + * TLB related junk in there among other things. > + */ > + if (env->excp_model &=3D POWERPC_EXCP_BOOKE) { > + msr &=3D ~(target_ulong)0xf0000; > + } > > #if defined(TARGET_PPC64) > /* Switching to 32-bit ? Crop the nip */ > @@ -990,7 +995,6 @@ void helper_rfi(CPUPPCState *env) > do_rfi(env, env->spr[SPR_SRR0], env->spr[SPR_SRR1] & 0xfffffffful)= ; > } > > -#define MSR_BOOK3S_MASK > #if defined(TARGET_PPC64) > void helper_rfid(CPUPPCState *env) > { > Fixes: a2e71b28e832346409efc795ecd1f0a2bcb705a3 Reported-by: Herv=C3=A9 Poussineau Tested-by: Herv=C3=A9 Poussineau For the problem to press enter to "activate this console", this is anothe= r regression. However, I was unable to pin-point it to a specific commit (too much inte= rwinded regressions) It was working in 2.6.0 (commit a2e71b28e832346409efc795ecd1f0a2bcb705a3) Herv=C3=A9