From: Michael Tokarev <mjt@tls.msk.ru>
To: Julio Guerra <julio@farjump.io>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
qemu-trivial@nongnu.org
Cc: christophe@farjump.io, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-trivial] [PATCH v2] taget-ppc: Fix read access to IBAT registers higher than IBAT3
Date: Tue, 03 Nov 2015 15:16:47 +0300 [thread overview]
Message-ID: <5638A5AF.9000709@msgid.tls.msk.ru> (raw)
In-Reply-To: <CAFAwnGNwFft-tH+3mhspok2gz2UKiHeiuqi_ARdB4=6k4wq4uQ@mail.gmail.com>
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 <julio@farjump.io <mailto:julio@farjump.io>> 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 <julio@farjump.io <mailto:julio@farjump.io>>
> ---
> 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
>
WARNING: multiple messages have this Message-ID (diff)
From: Michael Tokarev <mjt@tls.msk.ru>
To: Julio Guerra <julio@farjump.io>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
qemu-trivial@nongnu.org
Cc: christophe@farjump.io, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH v2] taget-ppc: Fix read access to IBAT registers higher than IBAT3
Date: Tue, 03 Nov 2015 15:16:47 +0300 [thread overview]
Message-ID: <5638A5AF.9000709@msgid.tls.msk.ru> (raw)
In-Reply-To: <CAFAwnGNwFft-tH+3mhspok2gz2UKiHeiuqi_ARdB4=6k4wq4uQ@mail.gmail.com>
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 <julio@farjump.io <mailto:julio@farjump.io>> 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 <julio@farjump.io <mailto:julio@farjump.io>>
> ---
> 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
>
next prev parent reply other threads:[~2015-11-03 12:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 17:43 [Qemu-trivial] [PATCH v2] taget-ppc: Fix read access to IBAT registers higher than IBAT3 Julio Guerra
2015-10-14 17:43 ` [Qemu-devel] " Julio Guerra
2015-11-03 8:00 ` [Qemu-trivial] " Julio Guerra
2015-11-03 8:00 ` [Qemu-devel] " Julio Guerra
2015-11-03 12:16 ` Michael Tokarev [this message]
2015-11-03 12:16 ` Michael Tokarev
2015-11-03 13:29 ` [Qemu-trivial] " Mark Cave-Ayland
2015-11-03 13:29 ` Mark Cave-Ayland
2015-11-03 16:52 ` [Qemu-trivial] " Julio Guerra
2015-11-03 16:52 ` Julio Guerra
2015-11-06 8:04 ` [Qemu-trivial] " Michael Tokarev
2015-11-06 8:04 ` [Qemu-devel] " Michael Tokarev
2015-11-11 1:03 ` [Qemu-trivial] [Qemu-ppc] " David Gibson
2015-11-11 1:03 ` [Qemu-devel] " David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5638A5AF.9000709@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=agraf@suse.de \
--cc=christophe@farjump.io \
--cc=julio@farjump.io \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.