Skip to contentSkip to conversation

xen: fix performance decrease with asid assignment

PATCH New Christoph Egger 1 participant 1 message Jun 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: fix performance decrease with asid assignment

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

Signature · 6 lines
---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
xen/arch/x86/hvm/svm/asid.c +2 -1
diff -r 1f466caea5b7 xen/arch/x86/hvm/svm/asid.c
@@ -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;
 }
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel