This patch makes preempt emulation more strict in differentiating its
own dr0 hardware breakpoint from a singlestep in return from kprobes
pre-handler that will invoke the post-handler through int1 debug TS on
eflags. This avoids GPF when kprobes returns from pre-handler with the
dr7 loaded with preempt emulation.

Signed-off-by: Andrea Arcangeli <[EMAIL PROTECTED]>

--- kvm-userland/kernel/preempt.c       2008-05-06 19:33:40.000000000 +0200
+++ /home/andrea/kernel/qumranet/kvm/kernel/preempt.c   2008-06-05 
00:18:06.000000000 +0200
@@ -140,6 +147,11 @@
      "cmp $0x701, " TMP " \n\t"
      "pop "  TMP " \n\t"
      "jnz .Lnotme \n\t"
+     "push "  TMP " \n\t"
+     "mov %db6, " TMP " \n\t"
+     "test $0x1, " TMP " \n\t"
+     "pop "  TMP " \n\t"
+     "jz .Lnotme \n\t"
      SAVE_REGS "\n\t"
 #ifdef CONFIG_X86_64
      "leaq 120(%rsp),%rdi\n\t"
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to