From: Paolo Bonzini <pbonzini@redhat.com>
To: Richard Henderson <rth@twiddle.net>
Cc: Dave Hansen <dave.hansen@intel.com>,
dave@sr71.net, qemu-devel@nongnu.org,
Dave Hansen <dave.hansen@linux.intel.com>,
Eduardo Habkost <ehabkost@redhat.com>,
qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] i386 translation: fix typo in xsetbv implementation
Date: Sat, 23 Jul 2016 03:51:19 -0400 (EDT) [thread overview]
Message-ID: <70840772.9841862.1469260279962.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <11445865-60ff-4d9a-ccfb-cfbcb3a92899@twiddle.net>
> On 07/20/2016 09:27 PM, Dave Hansen wrote:
> > QEMU 2.6 added support for the XSAVE family of instructions, which
> > includes the XSETBV instruction which allows setting the 'XCR0'
> > register.
> >
> > But, when booting Linux kernels with XSAVE support enabled, I was
> > getting very early crashes where the instruction pointer was set
> > to 0x3. I tracked it down to a jump instruction generated by this:
> >
> > gen_jmp_im(s->pc - pc_start);
> >
> > where s->pc is pointing to the instruction after XSETBV and pc_start
> > is pointing _at_ XSETBV. Subtract the two and you get 0x3. Whoops.
> >
> > The fix is to replace this typo with the pattern found everywhere
> > else in the file when folks want to end the translation buffer.
> >
> > Richard Henderson confirmed that this is a bug and that this is the
> > correct fix.
> >
> > Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> > Cc: Paolo Bonzini <pbonzini@redhat.com>
> > Cc: Eduardo Habkost <ehabkost@redhat.com>
> > Cc: Richard Henderson <rth@twiddle.net>
> > ---
> > target-i386/translate.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Richard Henderson <rth@twiddle.net>
Thanks, queued and CCed qemu-stable.
Paolo
prev parent reply other threads:[~2016-07-23 7:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 15:57 [Qemu-devel] [PATCH] i386 translation: fix typo in xsetbv implementation Dave Hansen
2016-07-23 1:31 ` Richard Henderson
2016-07-23 7:51 ` Paolo Bonzini [this message]
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=70840772.9841862.1469260279962.JavaMail.zimbra@redhat.com \
--to=pbonzini@redhat.com \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=dave@sr71.net \
--cc=ehabkost@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=rth@twiddle.net \
/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).