Commit d81135a5 authored by Xiao Guangrong's avatar Xiao Guangrong Committed by Paolo Bonzini

KVM: x86: do not reset mmu if CR0.CD and CR0.NW are changed

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: default avatarXiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent efdfe536
...@@ -572,8 +572,7 @@ static bool pdptrs_changed(struct kvm_vcpu *vcpu) ...@@ -572,8 +572,7 @@ static bool pdptrs_changed(struct kvm_vcpu *vcpu)
int kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0) int kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
{ {
unsigned long old_cr0 = kvm_read_cr0(vcpu); unsigned long old_cr0 = kvm_read_cr0(vcpu);
unsigned long update_bits = X86_CR0_PG | X86_CR0_WP | unsigned long update_bits = X86_CR0_PG | X86_CR0_WP;
X86_CR0_CD | X86_CR0_NW;
cr0 |= X86_CR0_ET; cr0 |= X86_CR0_ET;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment