summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2009-01-11 17:19:35 +0200
committerAvi Kivity <avi@redhat.com>2009-03-24 11:03:04 +0200
commit5a41accd3f69c6ef1d58f0c148980bae70515937 (patch)
treefe5fe92c1e52d6a0d8ea36b4792822d2034a682a /arch/x86
parentf6e2c02b6d28ddabe99377c5640a833407a62632 (diff)
KVM: MMU: Only enable cr4_pge role in shadow mode
Two dimensional paging is only confused by it. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 6fbc3460337..19ccde621cd 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -364,7 +364,7 @@ void kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
}
kvm_x86_ops->set_cr4(vcpu, cr4);
vcpu->arch.cr4 = cr4;
- vcpu->arch.mmu.base_role.cr4_pge = !!(cr4 & X86_CR4_PGE);
+ vcpu->arch.mmu.base_role.cr4_pge = (cr4 & X86_CR4_PGE) && !tdp_enabled;
kvm_mmu_sync_global(vcpu);
kvm_mmu_reset_context(vcpu);
}