All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wanpeng Li <wanpeng.li@linux.intel.com>
To: Nadav Amit <namit@cs.technion.ac.il>
Cc: pbonzini@redhat.com, kvm@vger.kernel.org
Subject: Re: [PATCH v2 4/4] KVM: x86: Clear CR2 on VCPU reset
Date: Tue, 14 Apr 2015 18:03:26 +0800	[thread overview]
Message-ID: <20150414100326.GA4101@kernel> (raw)
In-Reply-To: <1427933438-12782-5-git-send-email-namit@cs.technion.ac.il>

Hi Nadav,
On Thu, Apr 02, 2015 at 03:10:38AM +0300, Nadav Amit wrote:
>CR2 is not cleared as it should after reset.  See Intel SDM table named "IA-32
>Processor States Following Power-up, Reset, or INIT".

How you trigger the reset instead of the "Power-up" one?

Regards,
Wanpeng Li 

>
>Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
>---
> arch/x86/kvm/x86.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>index e4ac17e..8fdad04 100644
>--- a/arch/x86/kvm/x86.c
>+++ b/arch/x86/kvm/x86.c
>@@ -7117,6 +7117,8 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu, bool init_event)
> 	vcpu->arch.dr7 = DR7_FIXED_1;
> 	kvm_update_dr7(vcpu);
> 
>+	vcpu->arch.cr2 = 0;
>+
> 	kvm_make_request(KVM_REQ_EVENT, vcpu);
> 	vcpu->arch.apf.msr_val = 0;
> 	vcpu->arch.st.msr_val = 0;
>-- 
>1.9.1
>
>--
>To unsubscribe from this list: send the line "unsubscribe kvm" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-04-14 10:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-02  0:10 [PATCH v2 0/4] KVM: x86: Reset fixes Nadav Amit
2015-04-02  0:10 ` [PATCH v2 1/4] KVM: x86: INIT and reset sequences are different Nadav Amit
2015-04-02  2:17   ` Bandan Das
2015-04-07 13:23     ` Paolo Bonzini
2015-04-07 16:17       ` Bandan Das
2015-04-07 16:22         ` Paolo Bonzini
2015-04-07 16:35           ` Bandan Das
2015-04-07 13:23   ` Paolo Bonzini
2015-04-07 13:57   ` Paolo Bonzini
2015-04-02  0:10 ` [PATCH v2 2/4] KVM: x86: BSP in MSR_IA32_APICBASE is writable Nadav Amit
2015-04-02  0:10 ` [PATCH v2 3/4] KVM: x86: DR0-DR3 are not clear on reset Nadav Amit
2015-04-02  0:10 ` [PATCH v2 4/4] KVM: x86: Clear CR2 on VCPU reset Nadav Amit
2015-04-14 10:03   ` Wanpeng Li [this message]
2015-04-14 10:31     ` Nadav Amit
2015-04-07 14:01 ` [PATCH v2 0/4] KVM: x86: Reset fixes Paolo Bonzini

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=20150414100326.GA4101@kernel \
    --to=wanpeng.li@linux.intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=namit@cs.technion.ac.il \
    --cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.