From: Paolo Bonzini <pbonzini@redhat.com>
To: Stevie Lavern <stevie.lavern@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Bug] x86 EFLAGS refresh is not happening correctly
Date: Thu, 5 Aug 2021 13:24:12 +0200 [thread overview]
Message-ID: <0d982751-7dfe-9a45-df5b-fbe57d36ccef@redhat.com> (raw)
In-Reply-To: <CADV2EAvr0Sb55TE=uffkb4Z17ZHNBCZGLm0nA94qKZrx1WM35A@mail.gmail.com>
On 05/08/21 11:51, Stevie Lavern wrote:
>
> Shouldn't it be:
> eflags = cpu_cc_compute_all(env, CC_OP) | (env->df & DF_MASK);
> as eflags is entirely reevaluated by "cpu_cc_compute_all" ?
No, both are wrong. env->eflags contains flags other than the
arithmetic flags (OF/SF/ZF/AF/PF/CF) and those have to be preserved.
The right code is in helper_read_eflags. You can move it into
cpu_compute_eflags, and make helper_read_eflags use it.
Paolo
next prev parent reply other threads:[~2021-08-05 11:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-05 9:51 [Bug] x86 EFLAGS refresh is not happening correctly Stevie Lavern
2021-08-05 11:24 ` Paolo Bonzini [this message]
2021-08-05 11:33 ` Paolo Bonzini
2021-08-05 12:47 ` Stevie Lavern
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=0d982751-7dfe-9a45-df5b-fbe57d36ccef@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stevie.lavern@gmail.com \
/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).