xcp-1.6-updates/xen-4.1.hg

changeset 23318:1d437f7fb15d

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
author Christoph Egger <Christoph.Egger@amd.com>
date Mon Jul 09 10:28:50 2012 +0100 (2012-07-09)
parents c1f43d07dc1e
children ff523faf2be1
files xen/arch/x86/hvm/svm/asid.c
line diff
     1.1 --- a/xen/arch/x86/hvm/svm/asid.c	Mon Jul 09 10:24:44 2012 +0100
     1.2 +++ b/xen/arch/x86/hvm/svm/asid.c	Mon Jul 09 10:28:50 2012 +0100
     1.3 @@ -52,7 +52,8 @@ void svm_asid_handle_vmrun(void)
     1.4          return;
     1.5      }
     1.6  
     1.7 -    vmcb_set_guest_asid(vmcb, curr->arch.hvm_vcpu.asid);
     1.8 +    if (vmcb_get_guest_asid(vmcb) != curr->arch.hvm_vcpu.asid)
     1.9 +        vmcb_set_guest_asid(vmcb, curr->arch.hvm_vcpu.asid);
    1.10      vmcb->tlb_control = need_flush;
    1.11  }
    1.12