aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Egger <Christoph.Egger@amd.com>2012-07-09 10:28:50 +0100
committerChristoph Egger <Christoph.Egger@amd.com>2012-07-09 10:28:50 +0100
commiteff23cb0e5fa78b33af6e97d6a96fe106e40c4ae (patch)
tree082860bb8efa1fe478bee7f60299da0a5d8e0b5a
parent4e8f99fc6e93baff90fcff4993cc40f4be77b2df (diff)
downloadxen-eff23cb0e5fa78b33af6e97d6a96fe106e40c4ae.tar.gz
xen-eff23cb0e5fa78b33af6e97d6a96fe106e40c4ae.tar.bz2
xen-eff23cb0e5fa78b33af6e97d6a96fe106e40c4ae.zip
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
-rw-r--r--xen/arch/x86/hvm/svm/asid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/svm/asid.c b/xen/arch/x86/hvm/svm/asid.c
index 3b9c6ce0f6..7bc17b5f3e 100644
--- a/xen/arch/x86/hvm/svm/asid.c
+++ b/xen/arch/x86/hvm/svm/asid.c
@@ -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;
}