All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: MMU: Drop cr4.pge from shadow page role
@ 2010-04-19 14:31 Avi Kivity
  2010-04-20  2:28 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Avi Kivity @ 2010-04-19 14:31 UTC (permalink / raw
  To: Marcelo Tosatti, kvm; +Cc: Avi Kivity

Since commit bf47a760f66ad, we no longer handle ptes with the global bit
set specially, so there is no reason to distinguish between shadow pages
created with cr4.gpe set and clear.

Such tracking is expensive when the guest toggles cr4.pge, so drop it.

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 arch/x86/include/asm/kvm_host.h |    1 -
 arch/x86/kvm/mmutrace.h         |    3 +--
 arch/x86/kvm/x86.c              |    1 -
 3 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 3c31c5a..d47d087 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -178,7 +178,6 @@ union kvm_mmu_page_role {
 		unsigned direct:1;
 		unsigned access:3;
 		unsigned invalid:1;
-		unsigned cr4_pge:1;
 		unsigned nxe:1;
 	};
 };
diff --git a/arch/x86/kvm/mmutrace.h b/arch/x86/kvm/mmutrace.h
index 3851f1f..bc4f7f0 100644
--- a/arch/x86/kvm/mmutrace.h
+++ b/arch/x86/kvm/mmutrace.h
@@ -28,7 +28,7 @@
 								        \
 	role.word = __entry->role;					\
 									\
-	trace_seq_printf(p, "sp gfn %llx %u%s q%u%s %s%s %spge"		\
+	trace_seq_printf(p, "sp gfn %llx %u%s q%u%s %s%s"		\
 			 " %snxe root %u %s%c",				\
 			 __entry->gfn, role.level,			\
 			 role.cr4_pae ? " pae" : "",			\
@@ -36,7 +36,6 @@
 			 role.direct ? " direct" : "",			\
 			 access_str[role.access],			\
 			 role.invalid ? " invalid" : "",		\
-			 role.cr4_pge ? "" : "!",			\
 			 role.nxe ? "" : "!",				\
 			 __entry->root_count,				\
 			 __entry->unsync ? "unsync" : "sync", 0);	\
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 58a96e6..d7d58ce 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -488,7 +488,6 @@ void kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
 	}
 	kvm_x86_ops->set_cr4(vcpu, cr4);
 	vcpu->arch.cr4 = cr4;
-	vcpu->arch.mmu.base_role.cr4_pge = (cr4 & X86_CR4_PGE) && !tdp_enabled;
 	kvm_mmu_reset_context(vcpu);
 }
 EXPORT_SYMBOL_GPL(kvm_set_cr4);
-- 
1.6.6.1


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

* Re: [PATCH] KVM: MMU: Drop cr4.pge from shadow page role
  2010-04-19 14:31 [PATCH] KVM: MMU: Drop cr4.pge from shadow page role Avi Kivity
@ 2010-04-20  2:28 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2010-04-20  2:28 UTC (permalink / raw
  To: Avi Kivity; +Cc: kvm

On Mon, Apr 19, 2010 at 05:31:49PM +0300, Avi Kivity wrote:
> Since commit bf47a760f66ad, we no longer handle ptes with the global bit
> set specially, so there is no reason to distinguish between shadow pages
> created with cr4.gpe set and clear.
> 
> Such tracking is expensive when the guest toggles cr4.pge, so drop it.
> 
> Signed-off-by: Avi Kivity <avi@redhat.com>

ACK


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

end of thread, other threads:[~2010-04-20  2:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-19 14:31 [PATCH] KVM: MMU: Drop cr4.pge from shadow page role Avi Kivity
2010-04-20  2:28 ` Marcelo Tosatti

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.