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

[Xen-changelog] [xen-unstable] x86: make set_task_gate() x86-32-only since x86-64 doesn't have task gates.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1195740985 0
# Node ID 66a7ff3557623f3a23e03254e7835541c540200a
# Parent  db98e4676d3ffe4a609b29ddef4a8e08016e4a43
x86: make set_task_gate() x86-32-only since x86-64 doesn't have task gates.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 xen/arch/x86/traps.c        |    9 ---------
 xen/arch/x86/x86_32/traps.c |    9 +++++++++
 xen/include/asm-x86/desc.h  |    1 -
 3 files changed, 9 insertions(+), 10 deletions(-)

diff -r db98e4676d3f -r 66a7ff355762 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Thu Nov 22 14:12:47 2007 +0000
+++ b/xen/arch/x86/traps.c      Thu Nov 22 14:16:25 2007 +0000
@@ -2581,15 +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].b = 0;
-    wmb(); /* disable gate /then/ rewrite */
-    idt_table[n].a = sel << 16;
-    wmb(); /* rewrite /then/ enable gate */
-    idt_table[n].b = 0x8500;
-}
-
 void set_tss_desc(unsigned int n, void *addr)
 {
     _set_tssldt_desc(
diff -r db98e4676d3f -r 66a7ff355762 xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c       Thu Nov 22 14:12:47 2007 +0000
+++ b/xen/arch/x86/x86_32/traps.c       Thu Nov 22 14:16:25 2007 +0000
@@ -258,6 +258,15 @@ unsigned long do_iret(void)
     return 0;
 }
 
+static void set_task_gate(unsigned int n, unsigned int sel)
+{
+    idt_table[n].b = 0;
+    wmb(); /* disable gate /then/ rewrite */
+    idt_table[n].a = sel << 16;
+    wmb(); /* rewrite /then/ enable gate */
+    idt_table[n].b = 0x8500;
+}
+
 void __devinit subarch_percpu_traps_init(void)
 {
     struct tss_struct *tss = &doublefault_tss;
diff -r db98e4676d3f -r 66a7ff355762 xen/include/asm-x86/desc.h
--- a/xen/include/asm-x86/desc.h        Thu Nov 22 14:12:47 2007 +0000
+++ b/xen/include/asm-x86/desc.h        Thu Nov 22 14:16:25 2007 +0000
@@ -214,7 +214,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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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