WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] x86: make set_task_gate() x86-32-only

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: make set_task_gate() x86-32-only
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 22 Nov 2007 12:42:33 +0000
Delivery-date: Thu, 22 Nov 2007 04:42:00 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
.. since x86-64 doesn't have task gates.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86: make set_task_gate() x86-32-only, Jan Beulich <=