From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH] xen: fix performance decrease with asid assignment Date: Tue, 12 Jun 2012 15:32:52 +0200 Message-ID: <4FD74504.8090407@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090001020108050401000304" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --------------090001020108050401000304 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit Do not clear asid cleanbit unconditionally. This shaves off 100 cycles from the VMRUN instruction. Signed-off-by: Christoph Egger -- ---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 --------------090001020108050401000304 Content-Type: text/plain; charset="us-ascii"; name="xen_asid.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_asid.diff" Content-Description: xen_asid.diff diff -r 1f466caea5b7 xen/arch/x86/hvm/svm/asid.c --- a/xen/arch/x86/hvm/svm/asid.c Fri Jun 08 15:24:29 2012 +0200 +++ b/xen/arch/x86/hvm/svm/asid.c Tue Jun 12 15:12:48 2012 +0200 @@ -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; } --------------090001020108050401000304 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --------------090001020108050401000304--