kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kvm mmu: Don't calculate quadrant if tdp_enabled.
@ 2010-05-31  9:11 Gui Jianfeng
  2010-06-01 19:38 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Gui Jianfeng @ 2010-05-31  9:11 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm

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

Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
---
 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 0bb9f17..431863b 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@ -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;
-- 
1.6.5.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm mmu: Don't calculate quadrant if tdp_enabled.
  2010-05-31  9:11 [PATCH] kvm mmu: Don't calculate quadrant if tdp_enabled Gui Jianfeng
@ 2010-06-01 19:38 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2010-06-01 19:38 UTC (permalink / raw)
  To: Gui Jianfeng; +Cc: Avi Kivity, kvm

On Mon, May 31, 2010 at 05:11:39PM +0800, Gui Jianfeng wrote:
> There's no need to calculate quadrant if tdp is enabled.
> 
> Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
> ---
>  arch/x86/kvm/mmu.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-01 20:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-31  9:11 [PATCH] kvm mmu: Don't calculate quadrant if tdp_enabled Gui Jianfeng
2010-06-01 19:38 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).