From: Gui Jianfeng Date: Mon, 31 May 2010 09:11:39 +0000 (+0800) Subject: KVM: MMU: Don't calculate quadrant if tdp_enabled X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b66d80006e415ee083e59c9429911eab78047f8f;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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 Signed-off-by: Marcelo Tosatti --- diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 69d40a6e1e6..d3cd102aee2 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, if (role.direct) role.cr4_pae = 0; role.access = access; - if (vcpu->arch.mmu.root_level <= PT32_ROOT_LEVEL) { + if (!tdp_enabled && vcpu->arch.mmu.root_level <= PT32_ROOT_LEVEL) { quadrant = gaddr >> (PAGE_SHIFT + (PT64_PT_BITS * level)); quadrant &= (1 << ((PT32_PT_BITS - PT64_PT_BITS) * level)) - 1; role.quadrant = quadrant;