[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] nestedsvm: reduce TLB flushes



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1305878874 -3600
# Node ID ac3ac8ebbd1fa66c6dcb0ddab2e5dcd528985233
# Parent  4664f19944d76fcb95695f92abbef79f01750c80
nestedsvm: reduce TLB flushes

Reduce TLB flushes:
1. When we update the cr3 during VMRUN/VMEXIT emulation
    we toggle between n1asid and n2asid forth and back
    => no TLB flush needed
2. Only flush n1asid or n2asid depending on vcpu guest mode
    and not both unconditionally.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxx>
---


diff -r 4664f19944d7 -r ac3ac8ebbd1f xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Fri May 20 09:06:58 2011 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c        Fri May 20 09:07:54 2011 +0100
@@ -454,7 +454,7 @@
         if ( !nestedhvm_enabled(v->domain) )
             hvm_asid_flush_vcpu(v);
         else if ( nestedhvm_vmswitch_in_progress(v) )
-            ; /* We toggle between n1asid/n2asid -> no flush required. */
+            ; /* CR3 switches during VMRUN/VMEXIT do not flush the TLB. */
         else
             hvm_asid_flush_vcpu_asid(
                 nestedhvm_vcpu_in_guestmode(v)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.