do_debug() is capable of correctly dealing with #DB exceptions in guest
context, and indeed needs to be as the 'icebp' instruction skips the DPL
check anyway.

Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
CC: Jan Beulich <jbeul...@suse.com>
CC: Keir Fraser <k...@xen.org>
CC: Tim Deegan <t...@xen.org>
---
 xen/arch/x86/traps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c
index 3cd8746..e9bc3d6 100644
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -3518,7 +3518,7 @@ void __init init_idt_traps(void)
      * has been read and saved on the stack.
      */
     set_intr_gate(TRAP_divide_error,&divide_error);
-    set_intr_gate(TRAP_debug,&debug);
+    set_swint_gate(TRAP_debug,&debug);       /* usable from all privileges */
     set_intr_gate(TRAP_nmi,&nmi);
     set_swint_gate(TRAP_int3,&int3);         /* usable from all privileges */
     set_swint_gate(TRAP_overflow,&overflow); /* usable from all privileges */
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to