All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@amd.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH 5/5] svm: implement INVLPG part of DecodeAssist
Date: Fri, 15 Apr 2011 14:24:28 +0200	[thread overview]
Message-ID: <4DA838FC.5010606@amd.com> (raw)
In-Reply-To: <4DA83719.5080106@amd.com>

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

Newer SVM implementations (Bulldozer) give the desired address on
a INVLPG intercept explicitly in the EXITINFO1 field of the VMCB.
Use this address to avoid a costly instruction fetch and deocde
cycle.
Only useful with shadow paging.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>


[-- Attachment #2: da_5.patch --]
[-- Type: text/plain, Size: 1108 bytes --]

commit c89a3f986870176b2c178a28fce82e868160ee61
Author: Andre Przywara <andre.przywara@amd.com>
Date:   Sun Jul 25 15:09:44 2010 +0200

    svm: implement INVLPG part of DecodeAssist
    
    Newer SVM implementations (Bulldozer) give the desired address on
    a INVLPG intercept explicitly in the EXITINFO1 field of the VMCB.
    Use this address to avoid a costly instruction fetch and deocde
    cycle.
    Only useful with shadow paging.
    
    Signed-off-by: Andre Przywara <andre.przywara@amd.com>

diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index c406bd3..6b196b3 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1939,7 +1939,10 @@ asmlinkage void svm_vmexit_handler(struct cpu_user_regs *regs)
 
     case VMEXIT_INVLPG:
     case VMEXIT_INVLPGA:
-        if ( !handle_mmio() )
+        if (cpu_has_svm_decode) {
+            svm_invlpg_intercept(vmcb->exitinfo1);
+            __update_guest_eip(regs, vmcb->nextrip - vmcb->rip);
+        } else if ( !handle_mmio() )
             hvm_inject_exception(TRAP_gp_fault, 0, 0);
         break;
 

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

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

  parent reply	other threads:[~2011-04-15 12:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-15 12:16 [PATCH 0/5] svm: implement new DecodeAssist feature Andre Przywara
2011-04-15 12:21 ` [PATCH 1/5] vmx/hvm: move mov-cr handling functions to generic HVM code Andre Przywara
2011-04-18  8:48   ` Keir Fraser
2011-04-15 12:21 ` [PATCH 2/5] svm: add bit definitions for SVM DecodeAssist Andre Przywara
2011-04-15 12:22 ` [PATCH 3/5] svm: implement instruction fetch part of DecodeAssist Andre Przywara
2011-04-18  9:10   ` Keir Fraser
2011-04-18 12:37   ` Keir Fraser
2011-04-15 12:23 ` [PATCH 4/5] svm: implement CR access " Andre Przywara
2011-04-15 12:24 ` Andre Przywara [this message]
2011-04-18  9:07   ` [PATCH 5/5] svm: implement INVLPG " Keir Fraser

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=4DA838FC.5010606@amd.com \
    --to=andre.przywara@amd.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.