diff options
| author | Nadav Amit <namit@cs.technion.ac.il> | 2015-04-01 20:10:38 -0400 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-04-08 04:47:03 -0400 |
| commit | 1119022c71fb11826041787cf0ebffc1a1b0ba5b (patch) | |
| tree | c47bd1006d137b9063fe2b204be305f0379d5933 /arch/x86/kvm | |
| parent | ae561edeb421fbc24f97df7af8607c14009c16b2 (diff) | |
KVM: x86: Clear CR2 on VCPU reset
CR2 is not cleared as it should after reset. See Intel SDM table named "IA-32
Processor States Following Power-up, Reset, or INIT".
Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Message-Id: <1427933438-12782-5-git-send-email-namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
| -rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ad3809df7d0a..faf044dba60c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
| @@ -7123,6 +7123,8 @@ void kvm_vcpu_reset(struct kvm_vcpu *vcpu) | |||
| 7123 | vcpu->arch.dr7 = DR7_FIXED_1; | 7123 | vcpu->arch.dr7 = DR7_FIXED_1; |
| 7124 | kvm_update_dr7(vcpu); | 7124 | kvm_update_dr7(vcpu); |
| 7125 | 7125 | ||
| 7126 | vcpu->arch.cr2 = 0; | ||
| 7127 | |||
| 7126 | kvm_make_request(KVM_REQ_EVENT, vcpu); | 7128 | kvm_make_request(KVM_REQ_EVENT, vcpu); |
| 7127 | vcpu->arch.apf.msr_val = 0; | 7129 | vcpu->arch.apf.msr_val = 0; |
| 7128 | vcpu->arch.st.msr_val = 0; | 7130 | vcpu->arch.st.msr_val = 0; |
