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 <[email protected]>
>---
> 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 [email protected]
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to