From: Paolo Bonzini <pbonzini@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org, Marcelo Tosatti <mtosatti@redhat.com>
Subject: Re: [PATCH] KVM: x86 emulator: fix LMSW able to clear cr0.pe
Date: Mon, 02 Aug 2010 09:48:12 +0200 [thread overview]
Message-ID: <4C56783C.6060307@redhat.com> (raw)
In-Reply-To: <1280720100-2449-1-git-send-email-avi@redhat.com>
On 08/02/2010 05:35 AM, Avi Kivity wrote:
> LMSW is documented not to be able to set cr0.pe; make it so.
The code is correct, but LMSW is documented not to be able to _clear_
cr0.pe. :)
Paolo
> Signed-off-by: Avi Kivity<avi@redhat.com>
> ---
> arch/x86/kvm/emulate.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index dc1ecff..05f80f7 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -3212,7 +3212,7 @@ twobyte_insn:
> c->dst.val = ops->get_cr(0, ctxt->vcpu);
> break;
> case 6: /* lmsw */
> - ops->set_cr(0, (ops->get_cr(0, ctxt->vcpu) & ~0x0ful) |
> + ops->set_cr(0, (ops->get_cr(0, ctxt->vcpu) & ~0x0eul) |
> (c->src.val & 0x0f), ctxt->vcpu);
> c->dst.type = OP_NONE;
> break;
next prev parent reply other threads:[~2010-08-02 7:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-02 3:35 [PATCH] KVM: x86 emulator: fix LMSW able to clear cr0.pe Avi Kivity
2010-08-02 7:48 ` Paolo Bonzini [this message]
2010-08-02 7:51 ` Avi Kivity
-- strict thread matches above, loose matches on Subject: below --
2010-08-01 15:37 Avi Kivity
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=4C56783C.6060307@redhat.com \
--to=pbonzini@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.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