summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorXiao Guangrong <guangrong.xiao@linux.intel.com>2015-05-13 14:42:28 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2015-05-19 20:52:43 +0200
commitd81135a57aa66e5bec55cdfe4dda79633f9082dd (patch)
treece0f3cf0b521e7c742e6915e160205f84987e5f0 /arch/x86/kvm/x86.c
parentefdfe536d8c643391e19d5726b072f82964bfbdb (diff)
downloadlwn-d81135a57aa66e5bec55cdfe4dda79633f9082dd.tar.gz
lwn-d81135a57aa66e5bec55cdfe4dda79633f9082dd.zip
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: Xiao Guangrong <guangrong.xiao@linux.intel.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index bbe184f07bf9..457b908244f2 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -572,8 +572,7 @@ out:
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;