vmx: Update RIP past INT3 instruction on INT3 vmexit.
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 10 Oct 2008 09:11:34 +0000 (10:11 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 10 Oct 2008 09:11:34 +0000 (10:11 +0100)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/hvm/vmx/vmx.c

index 6059af04b40db71075c1a6ffb1f5712152b9127f..1aba4c4d4dbb166e5365adab8eec16b796c48170 100644 (file)
@@ -2115,10 +2115,15 @@ asmlinkage void vmx_vmexit_handler(struct cpu_user_regs *regs)
              */
             exit_qualification = __vmread(EXIT_QUALIFICATION);
             write_debugreg(6, exit_qualification | 0xffff0ff0);
-            /* fall through */
+            if ( !v->domain->debugger_attached )
+                goto exit_and_crash;
+            domain_pause_for_debugger();
+            break;
         case TRAP_int3:
             if ( !v->domain->debugger_attached )
                 goto exit_and_crash;
+            inst_len = __get_instruction_length(); /* Safe: INT3 */
+            __update_guest_eip(inst_len);
             domain_pause_for_debugger();
             break;
         case TRAP_no_device: