xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: [PATCH] xen: fix performance decrease with asid assignment
Date: Tue, 12 Jun 2012 15:32:52 +0200	[thread overview]
Message-ID: <4FD74504.8090407@amd.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 422 bytes --]


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

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>

-- 
---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

[-- Attachment #2: xen_asid.diff --]
[-- Type: text/plain, Size: 446 bytes --]

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;
 }
 

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

                 reply	other threads:[~2012-06-12 13:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FD74504.8090407@amd.com \
    --to=christoph.egger@amd.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).