qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 15/17] ppc: Add dummy POWER8 MPPR register


From: David Gibson
Subject: Re: [Qemu-devel] [PATCH 15/17] ppc: Add dummy POWER8 MPPR register
Date: Wed, 16 Mar 2016 12:14:12 +1100
User-agent: Mutt/1.5.24 (2015-08-30)

On Mon, Mar 14, 2016 at 05:56:38PM +0100, Cédric Le Goater wrote:
> From: Benjamin Herrenschmidt <address@hidden>
> 
> Controls the micropartition prefetch, this is pretty much meaningless
> in full emulation (used for priming the caches on real HW).
> 
> Signed-off-by: Benjamin Herrenschmidt <address@hidden>

So, this is readable with HV=0, so technically a fix even for non-HV
machines.  I'm guessing it's not actually read in practice outside the
HV, though.  Not sure if this should go in 2.6 or 2.7.

> ---
>  target-ppc/cpu.h            |  1 +
>  target-ppc/translate_init.c | 13 +++++++++++++
>  2 files changed, 14 insertions(+)
> 
> diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
> index 81a3e6b5ed29..5203cc6a3bfb 100644
> --- a/target-ppc/cpu.h
> +++ b/target-ppc/cpu.h
> @@ -1398,6 +1398,7 @@ static inline int cpu_mmu_index (CPUPPCState *env, bool 
> ifetch)
>  #define SPR_DHDES             (0x0B1)
>  #define SPR_DPDES             (0x0B0)
>  #define SPR_DAWR              (0x0B4)
> +#define SPR_MPPR              (0x0B8)
>  #define SPR_RPR               (0x0BA)
>  #define SPR_DAWRX             (0x0BC)
>  #define SPR_HFSCR             (0x0BE)
> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index 28a9c2e73156..cfb1bc088950 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
> @@ -8161,6 +8161,18 @@ static void gen_spr_power8_ic(CPUPPCState *env)
>  #endif
>  }
>  
> +static void gen_spr_power8_book4(CPUPPCState *env)
> +{
> +    /* Add a number of P8 book4 registers */
> +#if !defined(CONFIG_USER_ONLY)
> +    spr_register_hv(env, SPR_MPPR, "MPPR",
> +                    SPR_NOACCESS, SPR_NOACCESS,
> +                    &spr_read_generic, SPR_NOACCESS,
> +                    &spr_read_generic, &spr_write_generic,
> +                    0);
> +#endif
> +}
> +
>  static void init_proc_book3s_64(CPUPPCState *env, int version)
>  {
>      gen_spr_ne_601(env);
> @@ -8216,6 +8228,7 @@ static void init_proc_book3s_64(CPUPPCState *env, int 
> version)
>          gen_spr_power8_rpr(env);
>          gen_spr_power8_dbell(env);
>          gen_spr_power8_ic(env);
> +        gen_spr_power8_book4(env);
>      }
>      if (version < BOOK3S_CPU_POWER8) {
>          gen_spr_book3s_dbg(env);

-- 
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

Attachment: signature.asc
Description: PGP signature


reply via email to

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