diff options
author | Christoph Egger <Christoph.Egger@amd.com> | 2012-06-13 11:51:26 +0200 |
---|---|---|
committer | Christoph Egger <Christoph.Egger@amd.com> | 2012-06-13 11:51:26 +0200 |
commit | 0cdb73707d054a60d9ac8cc16fb72caea0a8d395 (patch) | |
tree | 59943ca3c732f5529b5aec20315d111f0fc7d8fc /xen/arch/x86/hvm/svm | |
parent | 3a07eef100625b43bf2b63c34a1c32d823f7764b (diff) | |
download | xen-0cdb73707d054a60d9ac8cc16fb72caea0a8d395.tar.gz xen-0cdb73707d054a60d9ac8cc16fb72caea0a8d395.tar.bz2 xen-0cdb73707d054a60d9ac8cc16fb72caea0a8d395.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>
Diffstat (limited to 'xen/arch/x86/hvm/svm')
-rw-r--r-- | xen/arch/x86/hvm/svm/asid.c | 3 |
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 14e2abd919..3fde3631c4 100644 --- a/xen/arch/x86/hvm/svm/asid.c +++ b/xen/arch/x86/hvm/svm/asid.c @@ -56,7 +56,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; } |