]> xenbits.xensource.com Git - xen.git/commitdiff
svm: implement INVLPG part of DecodeAssist
authorAndre Przywara <andre.przywara@amd.com>
Mon, 18 Apr 2011 09:06:37 +0000 (10:06 +0100)
committerAndre Przywara <andre.przywara@amd.com>
Mon, 18 Apr 2011 09:06:37 +0000 (10:06 +0100)
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@amd.com>
xen/arch/x86/hvm/svm/svm.c

index 18acd562a0132672dd6f48bbe2968d1af4749607..e76509b23478c82bd10dfce930f7b6713a516ffd 100644 (file)
@@ -1929,7 +1929,12 @@ asmlinkage void svm_vmexit_handler(struct cpu_user_regs *regs)
         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;