From 8dea08ed8b1359fb1e0793d8776aae4369281c03 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Mon, 18 Apr 2011 10:06:37 +0100 Subject: [PATCH] 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 --- xen/arch/x86/hvm/svm/svm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 18acd562a0..e76509b234 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -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; -- 2.30.2