[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] svm: implement INVLPG part of DecodeAssist



# HG changeset patch
# User Andre Przywara <andre.przywara@xxxxxxx>
# Date 1303117597 -3600
# Node ID e324c4d1dd6eeb9417fec513640ca795bd0f5dd4
# Parent  2c8ad607ece18b4740b9fc4ffe267a0e0893c141
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 decode
cycle.

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


diff -r 2c8ad607ece1 -r e324c4d1dd6e xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Mon Apr 18 10:01:06 2011 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c        Mon Apr 18 10:06:37 2011 +0100
@@ -1929,7 +1929,12 @@
         break;
 
     case VMEXIT_INVLPG:
-        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;
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.