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

[Xen-changelog] [xen-unstable] nestedsvm: update rip on invlpga intercept



# HG changeset patch
# User Christoph Egger <Christoph.Egger@xxxxxxx>
# Date 1305187246 -3600
# Node ID 19d6541c4abec3486c83de76102ec46d7fe22a16
# Parent  b6e8e916ed2827fb1329de0de2e23ee5b6b78662
nestedsvm: update rip on invlpga intercept

Fixes endless loop.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---


diff -r b6e8e916ed28 -r 19d6541c4abe xen/arch/x86/hvm/svm/emulate.c
--- a/xen/arch/x86/hvm/svm/emulate.c    Thu May 12 08:58:02 2011 +0100
+++ b/xen/arch/x86/hvm/svm/emulate.c    Thu May 12 09:00:46 2011 +0100
@@ -107,6 +107,7 @@
 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 @@
     [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 b6e8e916ed28 -r 19d6541c4abe xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c        Thu May 12 08:58:02 2011 +0100
+++ b/xen/arch/x86/hvm/svm/svm.c        Thu May 12 09:00:46 2011 +0100
@@ -2061,7 +2061,10 @@
         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 b6e8e916ed28 -r 19d6541c4abe xen/include/asm-x86/hvm/svm/emulate.h
--- a/xen/include/asm-x86/hvm/svm/emulate.h     Thu May 12 08:58:02 2011 +0100
+++ b/xen/include/asm-x86/hvm/svm/emulate.h     Thu May 12 09:00:46 2011 +0100
@@ -38,6 +38,7 @@
     INSTR_VMSAVE,
     INSTR_STGI,
     INSTR_CLGI,
+    INSTR_INVLPGA,
     INSTR_MAX_COUNT /* Must be last - Number of instructions supported */
 };
 

_______________________________________________
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®.