Skip to content

Commit

Permalink
KVM: MMU: Only enable cr4_pge role in shadow mode
Browse files Browse the repository at this point in the history
Two dimensional paging is only confused by it.

Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Avi Kivity committed Mar 24, 2009
1 parent f6e2c02 commit 5a41acc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 5a41acc

Please sign in to comment.