qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>,
	Ziqiao Kong <ziqiaokong@gmail.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: Bug: fstenv is wrongly implemented
Date: Fri, 2 Apr 2021 10:48:59 +0000	[thread overview]
Message-ID: <CAFEAcA95MnVMqt+BWN=TbNfkZDiHPqN2hNRNerAxM3TptfzP9g@mail.gmail.com> (raw)
In-Reply-To: <7c63e938-2482-3150-7cfb-1459c132fda6@redhat.com>

On Fri, 2 Apr 2021 at 09:47, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 02/04/21 10:29, Ziqiao Kong wrote:
> >
> > According to git blame, this bug is introduced about 13 years ago:
> > https://github.com/qemu/qemu/blame/633decd71119a4293e5e53e6059026c517a8bef0/target-i386/fpu_helper.c#L997.
> >
> > We also had a patch for this bug:
> > https://github.com/unicorn-engine/unicorn/commit/59b09a71bfc6fd8b95357944f6be9aa54f424421
> > which you may refer to. I can also help draft a patch if necessary.
> Hi!
> Unfortunately the patch is incorrect, because fpu_update_ip is called
> only at translation time and not at run-time.  If more than one x87
> instruction is present in the same translation block, or if a
> translation block has been compiled after the one that is executing,
> env->fpip will be incorrect.

I think this is https://bugs.launchpad.net/qemu/+bug/661696 ?
That had a patch attached which got some on-list discussion
back in 2010:
The review comments may be of help in coming up with an updated patch.

-- PMM

  parent reply	other threads:[~2021-04-02 10:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02  8:29 Bug: fstenv is wrongly implemented Ziqiao Kong
2021-04-02  8:45 ` Paolo Bonzini
2021-04-02  8:56   ` Ziqiao Kong
2021-04-02  9:01     ` Paolo Bonzini
2021-04-02 10:48   ` Peter Maydell [this message]
2021-04-06 13:16     ` Ziqiao Kong

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA95MnVMqt+BWN=TbNfkZDiHPqN2hNRNerAxM3TptfzP9g@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=ziqiaokong@gmail.com \


* 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).