qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Qemu-ppc] [PULL 05/23] ppc: Enforce setting MSR:EE, IR


From: Mark Cave-Ayland
Subject: Re: [Qemu-devel] [Qemu-ppc] [PULL 05/23] ppc: Enforce setting MSR:EE, IR and DR when MSR:PR is set
Date: Sat, 9 Jul 2016 01:43:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0

On 01/07/16 07:41, David Gibson wrote:

> From: Benjamin Herrenschmidt <b378bb0948277d71c78bc6d0c1ef80a253aafc80>
> 
> The architecture specifies that any instruction that sets MSR:PR will also
> set MSR:EE, IR and DR.
> 
> Signed-off-by: Benjamin Herrenschmidt <address@hidden>
> Signed-off-by: Cédric Le Goater <address@hidden>
> Signed-off-by: David Gibson <address@hidden>
> ---
>  target-ppc/helper_regs.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/target-ppc/helper_regs.h b/target-ppc/helper_regs.h
> index 8fc0934..8fdfa5c 100644
> --- a/target-ppc/helper_regs.h
> +++ b/target-ppc/helper_regs.h
> @@ -136,6 +136,10 @@ static inline int hreg_store_msr(CPUPPCState *env, 
> target_ulong value,
>          /* Change the exception prefix on PowerPC 601 */
>          env->excp_prefix = ((value >> MSR_EP) & 1) * 0xFFF00000;
>      }
> +    /* If PR=1 then EE, IR and DR must be 1 */
> +    if ((value >> MSR_PR) & 1) {
> +        value |= (1 << MSR_EE) | (1 << MSR_DR) | (1 << MSR_IR);
> +    }
>  #endif
>      env->msr = value;
>      hreg_compute_hflags(env);
> 

Unfortunately this patch causes a regression and breaks booting OS 9 and
OS X under qemu-system-ppc.


ATB,

Mark.




reply via email to

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