From: "Jan Beulich" Subject: [PATCH] x86: make set_task_gate() x86-32-only Date: Thu, 22 Nov 2007 12:42:33 +0000 Message-ID: <47458749.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org .. since x86-64 doesn't have task gates. Signed-off-by: Jan Beulich Index: 2007-11-13/xen/arch/x86/traps.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-11-13.orig/xen/arch/x86/traps.c 2007-11-12 08:47:42.0000000= 00 +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); } =20 -void set_task_gate(unsigned int n, unsigned int sel) -{ - idt_table[n].a =3D sel << 16; - idt_table[n].b =3D 0x8500; -} - void set_tss_desc(unsigned int n, void *addr) { _set_tssldt_desc( Index: 2007-11-13/xen/arch/x86/x86_32/traps.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-11-13.orig/xen/arch/x86/x86_32/traps.c 2007-11-02 17:25:57.0000000= 00 +0100 +++ 2007-11-13/xen/arch/x86/x86_32/traps.c 2007-11-13 15:31:07.0000000= 00 +0100 @@ -258,6 +258,12 @@ unsigned long do_iret(void) return 0; } =20 +static void set_task_gate(unsigned int n, unsigned int sel) +{ + idt_table[n].a =3D sel << 16; + idt_table[n].b =3D 0x8500; +} + void __devinit subarch_percpu_traps_init(void) { struct tss_struct *tss =3D &doublefault_tss; Index: 2007-11-13/xen/include/asm-x86/desc.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 2007-11-13.orig/xen/include/asm-x86/desc.h 2007-11-13 15:29:28.0000000= 00 +0100 +++ 2007-11-13/xen/include/asm-x86/desc.h 2007-11-13 15:31:27.0000000= 00 +0100 @@ -205,7 +205,6 @@ extern struct desc_struct compat_gdt_tab =20 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); =20 #endif /* !__ASSEMBLY__ */