From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH] nestedsvm: update rip on invlpga intercept Date: Wed, 11 May 2011 15:28:44 +0200 Message-ID: <4DCA8F0C.1040706@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040102070409080906010207" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --------------040102070409080906010207 Content-Type: text/plain; charset="ISO-8859-15"; format=flowed Content-Transfer-Encoding: 7bit Hi, update rip on invlpga intercept. Fixes endless loop. Signed-off-by: Christoph Egger -- ---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 --------------040102070409080906010207 Content-Type: text/plain; name="xen_nh_invlpga.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_nh_invlpga.diff" Content-Description: xen_nh_invlpga.diff diff -r 0c60c61ff836 xen/arch/x86/hvm/svm/emulate.c --- a/xen/arch/x86/hvm/svm/emulate.c Tue May 10 11:42:02 2011 +0200 +++ b/xen/arch/x86/hvm/svm/emulate.c Wed May 11 15:25:51 2011 +0200 @@ -107,6 +107,7 @@ MAKE_INSTR(VMLOAD, 3, 0x0f, 0x01, 0xda); MAKE_INSTR(VMSAVE, 3, 0x0f, 0x01, 0xdb); MAKE_INSTR(STGI, 3, 0x0f, 0x01, 0xdc); MAKE_INSTR(CLGI, 3, 0x0f, 0x01, 0xdd); +MAKE_INSTR(INVLPGA,3, 0x0f, 0x01, 0xdf); static const u8 *opc_bytes[INSTR_MAX_COUNT] = { @@ -126,6 +127,7 @@ static const u8 *opc_bytes[INSTR_MAX_COU [INSTR_VMSAVE] = OPCODE_VMSAVE, [INSTR_STGI] = OPCODE_STGI, [INSTR_CLGI] = OPCODE_CLGI, + [INSTR_INVLPGA] = OPCODE_INVLPGA, }; static int fetch(struct vcpu *v, u8 *buf, unsigned long addr, int len) diff -r 0c60c61ff836 xen/arch/x86/hvm/svm/svm.c --- a/xen/arch/x86/hvm/svm/svm.c Tue May 10 11:42:02 2011 +0200 +++ b/xen/arch/x86/hvm/svm/svm.c Wed May 11 15:25:51 2011 +0200 @@ -1993,7 +1990,10 @@ asmlinkage void svm_vmexit_handler(struc break; case VMEXIT_INVLPGA: + if ( (inst_len = __get_instruction_length(v, INSTR_INVLPGA)) == 0 ) + break; svm_invlpga_intercept(v, regs->eax, regs->ecx); + __update_guest_eip(regs, inst_len); break; case VMEXIT_VMMCALL: diff -r 0c60c61ff836 xen/include/asm-x86/hvm/svm/emulate.h --- a/xen/include/asm-x86/hvm/svm/emulate.h Tue May 10 11:42:02 2011 +0200 +++ b/xen/include/asm-x86/hvm/svm/emulate.h Wed May 11 15:25:51 2011 +0200 @@ -38,6 +38,7 @@ enum instruction_index { INSTR_VMSAVE, INSTR_STGI, INSTR_CLGI, + INSTR_INVLPGA, INSTR_MAX_COUNT /* Must be last - Number of instructions supported */ }; --------------040102070409080906010207 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------040102070409080906010207--