Mailing List Archive

[xen-4.1-testing] SVM: fix performance decrease with asid assignment
# HG changeset patch
# User Christoph Egger <Christoph.Egger@amd.com>
# Date 1341826130 -3600
# Node ID 1d437f7fb15d1582ed4be5df461fe7d49fba693b
# Parent c1f43d07dc1ed4203afe4f0a207da04213c53e3e
SVM: fix performance decrease with asid assignment

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

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen-unstable changeset: 25482:34c725807d21
xen-unstable date: Wed Jun 13 11:51:26 2012 +0200
---


diff -r c1f43d07dc1e -r 1d437f7fb15d xen/arch/x86/hvm/svm/asid.c
--- a/xen/arch/x86/hvm/svm/asid.c Mon Jul 09 10:24:44 2012 +0100
+++ b/xen/arch/x86/hvm/svm/asid.c Mon Jul 09 10:28:50 2012 +0100
@@ -52,7 +52,8 @@ void svm_asid_handle_vmrun(void)
return;
}

- vmcb_set_guest_asid(vmcb, curr->arch.hvm_vcpu.asid);
+ if (vmcb_get_guest_asid(vmcb) != curr->arch.hvm_vcpu.asid)
+ vmcb_set_guest_asid(vmcb, curr->arch.hvm_vcpu.asid);
vmcb->tlb_control = need_flush;
}


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