XXX This patch needs double checking... It fixed 32-bit userspace but I'm not sure it's right. I wonder whether msr_is_64bit() should be applied to env->msr, not msr, but I need to double check the architecture.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org> --- target-ppc/excp_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_helper.c index c1d6605..00fae60 100644 --- a/target-ppc/excp_helper.c +++ b/target-ppc/excp_helper.c @@ -878,13 +878,13 @@ static inline void do_rfi(CPUPPCState *env, target_ulong nip, target_ulong msr, CPUState *cs = CPU(ppc_env_get_cpu(env)); #if defined(TARGET_PPC64) + msr = msr & msrm; if (msr_is_64bit(env, msr)) { nip = (uint64_t)nip; - msr &= (uint64_t)msrm; } else { nip = (uint32_t)nip; - msr = (uint32_t)(msr & msrm); if (keep_msrh) { + msr &= 0xffffffff; msr |= env->msr & ~((uint64_t)0xFFFFFFFF); } } -- 2.5.0