diff options
author | Gui Jianfeng <guijianfeng@cn.fujitsu.com> | 2010-05-31 17:11:39 +0800 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-08-01 10:39:24 +0300 |
commit | b66d80006e415ee083e59c9429911eab78047f8f (patch) | |
tree | 0b8ab6cd2f728ab21e05361ce7ff5f1a3c0d3056 /arch/x86/kvm/mmu.c | |
parent | 316b95216e277cdb22bd65346f9b9d9e10d0f53d (diff) | |
download | blackbird-op-linux-b66d80006e415ee083e59c9429911eab78047f8f.tar.gz blackbird-op-linux-b66d80006e415ee083e59c9429911eab78047f8f.zip |
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.c | 2 |
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, 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; |