aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/mmu.c
diff options
context:
space:
mode:
authorGui Jianfeng <guijianfeng@cn.fujitsu.com>2010-05-31 05:11:39 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 03:39:24 -0400
commitb66d80006e415ee083e59c9429911eab78047f8f (patch)
tree0b8ab6cd2f728ab21e05361ce7ff5f1a3c0d3056 /arch/x86/kvm/mmu.c
parent316b95216e277cdb22bd65346f9b9d9e10d0f53d (diff)
KVM: MMU: Don't calculate quadrant if tdp_enabled
There's no need to calculate quadrant if tdp is enabled. Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm/mmu.c')
-rw-r--r--arch/x86/kvm/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 69d40a6e1e68..d3cd102aee26 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -1378,7 +1378,7 @@ static struct kvm_mmu_page *kvm_mmu_get_page(struct kvm_vcpu *vcpu,
1378 if (role.direct) 1378 if (role.direct)
1379 role.cr4_pae = 0; 1379 role.cr4_pae = 0;
1380 role.access = access; 1380 role.access = access;
1381 if (vcpu->arch.mmu.root_level <= PT32_ROOT_LEVEL) { 1381 if (!tdp_enabled && vcpu->arch.mmu.root_level <= PT32_ROOT_LEVEL) {
1382 quadrant = gaddr >> (PAGE_SHIFT + (PT64_PT_BITS * level)); 1382 quadrant = gaddr >> (PAGE_SHIFT + (PT64_PT_BITS * level));
1383 quadrant &= (1 << ((PT32_PT_BITS - PT64_PT_BITS) * level)) - 1; 1383 quadrant &= (1 << ((PT32_PT_BITS - PT64_PT_BITS) * level)) - 1;
1384 role.quadrant = quadrant; 1384 role.quadrant = quadrant;