[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v2] taget-ppc: Fix read access to IBAT registers h
From: |
Michael Tokarev |
Subject: |
Re: [Qemu-ppc] [PATCH v2] taget-ppc: Fix read access to IBAT registers higher than IBAT3 |
Date: |
Tue, 03 Nov 2015 15:16:47 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 |
03.11.2015 11:00, Julio Guerra wrote:
> Ping :)
Well, I'm not sure what can I do with this. I've no idea what is IBAT to start
with, so while technically the patch is a one-liner, I've no idea what it does
and how trivial it is :)
Maybe you can include some context which teaches me what it is all about, and in
that case it becomes really trivial, or.. I dunno :)
Thanks,
/mjt
> Le mer. 14 oct. 2015 19:43, Julio Guerra <address@hidden
> <mailto:address@hidden>> a écrit :
>
> Fix the index used to read the IBAT's vector which results in IBAT0..3
> instead
> of IBAT4..N.
>
> The bug appeared by saving/restoring contexts including IBATs values.
>
> Signed-off-by: Julio Guerra <address@hidden <mailto:address@hidden>>
> ---
> target-ppc/translate_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
> index b541473..76d9a02 100644
> --- a/target-ppc/translate_init.c
> +++ b/target-ppc/translate_init.c
> @@ -305,7 +305,7 @@ static void spr_read_ibat (DisasContext *ctx, int
> gprn, int sprn)
>
> static void spr_read_ibat_h (DisasContext *ctx, int gprn, int sprn)
> {
> - tcg_gen_ld_tl(cpu_gpr[gprn], cpu_env, offsetof(CPUPPCState,
> IBAT[sprn & 1][(sprn - SPR_IBAT4U) / 2]));
> + tcg_gen_ld_tl(cpu_gpr[gprn], cpu_env, offsetof(CPUPPCState,
> IBAT[sprn & 1][((sprn - SPR_IBAT4U) / 2) + 4]));
> }
>
> static void spr_write_ibatu (DisasContext *ctx, int sprn, int gprn)
> --
> 2.5.2
>