qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH for-8.2?] target/i386: Fix 32-bit wrapping of pc/eip computation
Date: Tue, 12 Dec 2023 22:23:21 +0100	[thread overview]
Message-ID: <CABgObfbLiqY+GQk6yAfMVke8fbz0PW2-JTKbTzDLmbyBRos02g@mail.gmail.com> (raw)
In-Reply-To: <0d42f12f-3af7-403e-9c0e-db462a3139b1@linaro.org>

On Tue, Dec 12, 2023 at 10:22 PM Richard Henderson
<richard.henderson@linaro.org> wrote:
> > Looks good, but perhaps you could also squash the following?
> >
> > diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c
> > index 2c6a12c8350..83ee89579b8 100644
> > --- a/target/i386/tcg/tcg-cpu.c
> > +++ b/target/i386/tcg/tcg-cpu.c
> > @@ -52,7 +52,11 @@ static void x86_cpu_synchronize_from_tb(CPUState *cs,
> >       /* The instruction pointer is always up to date with CF_PCREL. */
> >       if (!(tb_cflags(tb) & CF_PCREL)) {
> >           CPUX86State *env = cpu_env(cs);
> > -        env->eip = tb->pc - tb->cs_base;
> > +        if (tb->flags & HF_CS64_MASK) {
> > +            env->eip = tb->pc;
> > +        } else {
> > +            env->eip = (uint32_t) (tb->pc - tb->cs_base);
> > +        }
> >       }
> >   }
> >
> >
> > It wouldn't be the same bug as 2022 (it wouldn't be new with the vaddr
> > change) so it's okay to sort out this extra case after release.
>
> Good catch, I'll squash it.  Thanks.

BTW,

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo



  reply	other threads:[~2023-12-12 21:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-12 17:25 [PATCH for-8.2?] target/i386: Fix 32-bit wrapping of pc/eip computation Richard Henderson
2023-12-12 21:06 ` Stefan Hajnoczi
2023-12-12 21:08 ` Paolo Bonzini
2023-12-12 21:22   ` Richard Henderson
2023-12-12 21:23     ` Paolo Bonzini [this message]
2023-12-24 20:49 ` Michael Tokarev
2024-01-01  2:00   ` Richard Henderson

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=CABgObfbLiqY+GQk6yAfMVke8fbz0PW2-JTKbTzDLmbyBRos02g@mail.gmail.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).