Index: sys/arch/amd64/amd64/db_interface.c =================================================================== RCS file: /cvsroot/src/sys/arch/amd64/amd64/db_interface.c,v retrieving revision 1.15 diff -u -p -r1.15 db_interface.c --- sys/arch/amd64/amd64/db_interface.c 28 Nov 2007 16:28:43 -0000 1.15 +++ sys/arch/amd64/amd64/db_interface.c 19 Apr 2008 17:03:28 -0000 @@ -35,6 +35,7 @@ #include __KERNEL_RCSID(0, "$NetBSD: db_interface.c,v 1.15 2007/11/28 16:28:43 ad Exp $"); +#include "opt_xen.h" #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -99,10 +100,20 @@ db_machine_init(void) { #ifdef MULTIPROCESSOR + +#if !defined(XEN) ddb_vec = idt_vec_alloc(0xf0, 0xff); setgate((struct gate_descriptor *)&idt[ddb_vec], &Xintrddb, 1, SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); +#else + xen_idt[xen_idt_idx].vector = 0xf0; + xen_idt[xen_idt_idx].flags = SEL_KPL; + xen_idt[xen_idt_idx].cs = GSEL(GCODE_SEL, SEL_KPL); + xen_idt[xen_idt_idx].address = (unsigned long) &Xintrddb; + xen_idt_idx++; #endif + +#endif /* MULTIPROCESSOR */ } #ifdef MULTIPROCESSOR Index: sys/arch/amd64/include/segments.h =================================================================== RCS file: /cvsroot/src/sys/arch/amd64/include/segments.h,v retrieving revision 1.18 diff -u -p -r1.18 segments.h --- sys/arch/amd64/include/segments.h 19 Apr 2008 12:10:08 -0000 1.18 +++ sys/arch/amd64/include/segments.h 19 Apr 2008 17:03:29 -0000 @@ -218,7 +218,8 @@ struct region_descriptor { extern struct sys_segment_descriptor *ldt; #endif #ifdef XEN -extern struct trap_info *idt; +extern struct trap_info *xen_idt; +extern int xen_idt_idx; #else extern struct gate_descriptor *idt; #endif