Skip to content

Commit

Permalink
KVM: x86: do not reset mmu if CR0.CD and CR0.NW are changed
Browse files Browse the repository at this point in the history
CR0.CD and CR0.NW are not used by shadow page table so that need
not adjust mmu if these two bit are changed

Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Xiao Guangrong authored and bonzini committed May 19, 2015
1 parent efdfe53 commit d81135a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,7 @@ static bool pdptrs_changed(struct kvm_vcpu *vcpu)
int kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
{
unsigned long old_cr0 = kvm_read_cr0(vcpu);
unsigned long update_bits = X86_CR0_PG | X86_CR0_WP |
X86_CR0_CD | X86_CR0_NW;
unsigned long update_bits = X86_CR0_PG | X86_CR0_WP;

cr0 |= X86_CR0_ET;

Expand Down

0 comments on commit d81135a

Please sign in to comment.