qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] ppc: regression in 2.7.0-rc3 on rfi/rfid/hrfi instructi


From: Hervé Poussineau
Subject: Re: [Qemu-devel] ppc: regression in 2.7.0-rc3 on rfi/rfid/hrfi instructions
Date: Thu, 25 Aug 2016 22:14:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0

Le 25/08/2016 à 07:33, Benjamin Herrenschmidt a écrit :
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 = CPU(ppc_env_get_cpu(env));

-    /* MSR:POW cannot be set by any form of rfi */
-    msr &= ~(1ULL << MSR_POW);
+    /* These bits cannot be set by RFI on non-BookE systems and so must
+     * be filtered out. 6xx and 7xxx with SW TLB management will put
+     * TLB related junk in there among other things.
+     */
+    if (env->excp_model &= POWERPC_EXCP_BOOKE) {
+            msr &= ~(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é Poussineau <address@hidden>
Tested-by: Hervé Poussineau <address@hidden>

For the problem to press enter to "activate this console", this is another 
regression.
However, I was unable to pin-point it to a specific commit (too much 
interwinded regressions)
It was working in 2.6.0 (commit a2e71b28e832346409efc795ecd1f0a2bcb705a3)

Hervé



reply via email to

[Prev in Thread] Current Thread [Next in Thread]