aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-02-24 12:59:17 -0500
committerAvi Kivity <avi@redhat.com>2010-04-25 06:53:20 -0400
commitb44ea385d8cb187e04ec8d901d4c320c8b07c40b (patch)
treedcfa3bc8526ec7eef962d86f4a9ac966aaec6a1f
parent82494028dff648c29e3a40915f1fceca51b4490a (diff)
KVM: x86: Don't set arch.cr0 in kvm_set_cr0
The vcpu->arch.cr0 variable is already set in the architecture specific set_cr0 callbacks. There is no need to set it in the common code. This allows the architecture code to keep the old arch.cr0 value if it wants. This is required for nested svm to decide if a selective_cr0 exit needs to be injected. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--arch/x86/kvm/x86.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 81b7af5558f..d0b184b5c24 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -475,7 +475,6 @@ void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
475 } 475 }
476 476
477 kvm_x86_ops->set_cr0(vcpu, cr0); 477 kvm_x86_ops->set_cr0(vcpu, cr0);
478 vcpu->arch.cr0 = cr0;
479 478
480 kvm_mmu_reset_context(vcpu); 479 kvm_mmu_reset_context(vcpu);
481 return; 480 return;