All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: fix performance decrease with asid assignment
@ 2012-06-12 13:32 Christoph Egger
  0 siblings, 0 replies; only message in thread
From: Christoph Egger @ 2012-06-12 13:32 UTC (permalink / raw)
  To: xen-devel@lists.xen.org

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]


Do not clear asid cleanbit unconditionally. This shaves
off 100 cycles from the VMRUN instruction.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_asid.diff --]
[-- Type: text/plain, Size: 446 bytes --]

diff -r 1f466caea5b7 xen/arch/x86/hvm/svm/asid.c
--- a/xen/arch/x86/hvm/svm/asid.c	Fri Jun 08 15:24:29 2012 +0200
+++ b/xen/arch/x86/hvm/svm/asid.c	Tue Jun 12 15:12:48 2012 +0200
@@ -63,7 +63,8 @@ void svm_asid_handle_vmrun(void)
         return;
     }
 
-    vmcb_set_guest_asid(vmcb, p_asid->asid);
+    if (vmcb_get_guest_asid(vmcb) != p_asid->asid)
+        vmcb_set_guest_asid(vmcb, p_asid->asid);
     vmcb->tlb_control = need_flush;
 }
 

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-06-12 13:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-12 13:32 [PATCH] xen: fix performance decrease with asid assignment Christoph Egger

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.