Skip to contentSkip to conversation

kvm mmu: Don't calculate quadrant if tdp_enabled.

PATCH Applied Gui Jianfeng 2 participants 2 messages May 31, 2010 – Jun 1, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm mmu: Don't calculate quadrant if tdp_enabled.

There's no need to calculate quadrant if tdp is enabled.

---
 arch/x86/kvm/mmu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/mmu.c +1 -1
index 0bb9f17..431863b 100644
@@ -1346,7 +1346,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;
Signature · 1 line
1.6.5.2
#1 lore raw
Quoted 6 lines · Gui Jianfeng

There's no need to calculate quadrant if tdp is enabled.

---
 arch/x86/kvm/mmu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.