Received: from eggs.gnu.org ([2001:4830:134:3::10]:39124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtaW9-0000dr-Iz for qemu-devel@nongnu.org; Tue, 03 Nov 2015 07:16:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtaW8-0007xF-FG for qemu-devel@nongnu.org; Tue, 03 Nov 2015 07:16:49 -0500 Message-ID: <5638A5AF.9000709@msgid.tls.msk.ru> Date: Tue, 03 Nov 2015 15:16:47 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <1444844599-33161-1-git-send-email-julio@farjump.io> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] taget-ppc: Fix read access to IBAT registers higher than IBAT3 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Julio Guerra , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, qemu-trivial@nongnu.org Cc: christophe@farjump.io, Alexander Graf 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 > a =C3=A9crit : >=20 > Fix the index used to read the IBAT's vector which results in IBAT0= ..3 instead > of IBAT4..N. >=20 > The bug appeared by saving/restoring contexts including IBATs value= s. >=20 > Signed-off-by: Julio Guerra > > --- > target-ppc/translate_init.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/target-ppc/translate_init.c b/target-ppc/translate_ini= t.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, i= nt gprn, int sprn) >=20 > static void spr_read_ibat_h (DisasContext *ctx, int gprn, int sprn= ) > { > - tcg_gen_ld_tl(cpu_gpr[gprn], cpu_env, offsetof(CPUPPCState, IB= AT[sprn & 1][(sprn - SPR_IBAT4U) / 2])); > + tcg_gen_ld_tl(cpu_gpr[gprn], cpu_env, offsetof(CPUPPCState, IB= AT[sprn & 1][((sprn - SPR_IBAT4U) / 2) + 4])); > } >=20 > static void spr_write_ibatu (DisasContext *ctx, int sprn, int gprn= ) > -- > 2.5.2 >=20