public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: mmu: honor global bit on huge pages
@ 2006-12-04 14:57 Avi Kivity
       [not found] ` <20061204145735.89391A0016-LjA0eNSCdXrQnzwC+xcbyw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2006-12-04 14:57 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
  Cc: akpm-3NddpPZAyC0, mingo-X9Un+BFzKDI,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

The kvm mmu attempts to cache global translations, however it misses on
global huge page translation (which is what most global pages are).

By caching global huge page translations, boot time of fc5 i386 on i386
is reduced from ~35 seconds to ~24 seconds.

Signed-off-by: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>

Index: linux-2.6/drivers/kvm/paging_tmpl.h
===================================================================
--- linux-2.6.orig/drivers/kvm/paging_tmpl.h
+++ linux-2.6/drivers/kvm/paging_tmpl.h
@@ -105,7 +105,7 @@ static void FNAME(set_pde)(struct kvm_vc
 	if (PTTYPE == 32 && is_cpuid_PSE36())
 		gaddr |= (guest_pde & PT32_DIR_PSE36_MASK) <<
 			(32 - PT32_DIR_PSE36_SHIFT);
-	*shadow_pte = (guest_pde & PT_NON_PTE_COPY_MASK) |
+	*shadow_pte = (guest_pde & (PT_NON_PTE_COPY_MASK | PT_GLOBAL_MASK)) |
 		          ((guest_pde & PT_DIR_PAT_MASK) >>
 			            (PT_DIR_PAT_SHIFT - PT_PAT_SHIFT));
 	set_pte_common(vcpu, shadow_pte, gaddr,

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

end of thread, other threads:[~2006-12-04 15:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-04 14:57 [PATCH] KVM: mmu: honor global bit on huge pages Avi Kivity
     [not found] ` <20061204145735.89391A0016-LjA0eNSCdXrQnzwC+xcbyw@public.gmane.org>
2006-12-04 15:26   ` Renato S. Yamane
     [not found]     ` <45743E0C.6090705-OgAtk61DsrhwFqzsTH5u/w@public.gmane.org>
2006-12-04 15:29       ` Avi Kivity
     [not found]         ` <45743ECD.9050105-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2006-12-04 15:32           ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox