From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH UNTESTED] KVM: VMX: Save/restore rflags.vm correctly in real mode
Date: Thu, 8 Apr 2010 17:01:06 -0300 [thread overview]
Message-ID: <20100408200106.GA25347@amt.cnet> (raw)
In-Reply-To: <1270739975-25344-1-git-send-email-avi@redhat.com>
On Thu, Apr 08, 2010 at 06:19:35PM +0300, Avi Kivity wrote:
> Currently we set eflags.vm unconditionally when entering real mode emulation
> through virtual-8086 mode, and clear it unconditionally when we enter protected
> mode. The means that the following sequence
>
> KVM_SET_REGS (rflags.vm=1)
> KVM_SET_SREGS (cr0.pe=1)
>
> Ends up with rflags.vm clear due to KVM_SET_SREGS triggering enter_pmode().
>
> Fix by shadowing rflags.vm (and rflags.iopl) correctly while in real mode:
> reads and writes to those bits access a shadow register instead of the actual
> register.
>
> Signed-off-by: Avi Kivity <avi@redhat.com>
Tested and applied, thanks.
prev parent reply other threads:[~2010-04-08 20:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-08 15:19 [PATCH UNTESTED] KVM: VMX: Save/restore rflags.vm correctly in real mode Avi Kivity
2010-04-08 20:01 ` Marcelo Tosatti [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=20100408200106.GA25347@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.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