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

[Xen-devel] [PATCH] x86/traps: Avoid the #GP slowpath for guest #DB exceptions



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.cooper3@xxxxxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Keir Fraser <keir@xxxxxxx>
CC: Tim Deegan <tim@xxxxxxx>
---
 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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.