Jan Beulich
2007-Nov-22 12:42 UTC
[Xen-devel] [PATCH] x86: make set_task_gate() x86-32-only
.. since x86-64 doesn''t have task gates. Signed-off-by: Jan Beulich <jbeulich@novell.com> Index: 2007-11-13/xen/arch/x86/traps.c ==================================================================--- 2007-11-13.orig/xen/arch/x86/traps.c 2007-11-12 08:47:42.000000000 +0100 +++ 2007-11-13/xen/arch/x86/traps.c 2007-11-13 15:30:41.000000000 +0100 @@ -2581,12 +2581,6 @@ void set_system_gate(unsigned int n, voi _set_gate(idt_table+n,14,3,addr); } -void set_task_gate(unsigned int n, unsigned int sel) -{ - idt_table[n].a = sel << 16; - idt_table[n].b = 0x8500; -} - void set_tss_desc(unsigned int n, void *addr) { _set_tssldt_desc( Index: 2007-11-13/xen/arch/x86/x86_32/traps.c ==================================================================--- 2007-11-13.orig/xen/arch/x86/x86_32/traps.c 2007-11-02 17:25:57.000000000 +0100 +++ 2007-11-13/xen/arch/x86/x86_32/traps.c 2007-11-13 15:31:07.000000000 +0100 @@ -258,6 +258,12 @@ unsigned long do_iret(void) return 0; } +static void set_task_gate(unsigned int n, unsigned int sel) +{ + idt_table[n].a = sel << 16; + idt_table[n].b = 0x8500; +} + void __devinit subarch_percpu_traps_init(void) { struct tss_struct *tss = &doublefault_tss; Index: 2007-11-13/xen/include/asm-x86/desc.h ==================================================================--- 2007-11-13.orig/xen/include/asm-x86/desc.h 2007-11-13 15:29:28.000000000 +0100 +++ 2007-11-13/xen/include/asm-x86/desc.h 2007-11-13 15:31:27.000000000 +0100 @@ -205,7 +205,6 @@ extern struct desc_struct compat_gdt_tab extern void set_intr_gate(unsigned int irq, void * addr); extern void set_system_gate(unsigned int n, void *addr); -extern void set_task_gate(unsigned int n, unsigned int sel); extern void set_tss_desc(unsigned int n, void *addr); #endif /* !__ASSEMBLY__ */ _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel