KVM: x86: Don't set arch.cr0 in kvm_set_cr0
authorJoerg Roedel <joerg.roedel@amd.com>
Wed, 24 Feb 2010 17:59:17 +0000 (18:59 +0100)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Apr 2010 10:53:20 +0000 (13:53 +0300)
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>
arch/x86/kvm/x86.c

index 81b7af5..d0b184b 100644 (file)
@@ -475,7 +475,6 @@ void kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
        }
 
        kvm_x86_ops->set_cr0(vcpu, cr0);
-       vcpu->arch.cr0 = cr0;
 
        kvm_mmu_reset_context(vcpu);
        return;