Skip to content

Commit

Permalink
KVM: x86: Don't set arch.cr0 in kvm_set_cr0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel authored and Avi Kivity committed Apr 25, 2010
1 parent 8249402 commit b44ea38
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b44ea38

Please sign in to comment.