Skip to contentSkip to conversation

i386 linux: eliminate idt_table

PATCH New Jan Beulich 1 participant 1 message Feb 15, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i386 linux: eliminate idt_table

idt_table is meaningless in paravirtualized guests, but there were still a couple of references to it left. The easiest way to locate them was to get rid of the variable altogether.

Jan

arch/i386/kernel/head-xen.S +7 -3
Index: head-2006-02-14/arch/i386/kernel/head-xen.S
===================================================================
@@ -124,19 +124,23 @@ ENTRY(stack_start)
 	.long init_thread_union+THREAD_SIZE
 	.long __BOOT_DS
 
+#ifndef CONFIG_XEN
 ready:	.byte 0
-
-.globl idt_descr
-.globl cpu_gdt_descr
+#endif
 
 	ALIGN
+
+#ifndef CONFIG_XEN
 	.word 0				# 32-bit align idt_desc.address
+.globl idt_descr
 idt_descr:
 	.word IDT_ENTRIES*8-1		# idt contains 256 entries
 	.long idt_table
+#endif
 
 # boot GDT descriptor (later on used by CPU#0):
 	.word 0				# 32 bit align gdt_desc.address
+.globl cpu_gdt_descr
 cpu_gdt_descr:
 	.word GDT_SIZE
 	.long cpu_gdt_table
arch/i386/kernel/traps-xen.c +0 -15
Index: head-2006-02-14/arch/i386/kernel/traps-xen.c
===================================================================
@@ -61,13 +61,6 @@ asmlinkage int system_call(void);
 /* Do we ignore FPU interrupts ? */
 char ignore_fpu_irq = 0;
 
-/*
- * The IDT has to be page-aligned to simplify the Pentium
- * F0 0F bug workaround.. We have a special link segment
- * for this.
- */
-struct desc_struct idt_table[256] __attribute__((__section__(".data.idt"))) = { {0, 0}, };
-
 asmlinkage void divide_error(void);
 asmlinkage void debug(void);
 asmlinkage void nmi(void);
@@ -1001,14 +994,6 @@ asmlinkage void math_emulate(long arg)
 #ifdef CONFIG_X86_F00F_BUG
 void __init trap_init_f00f_bug(void)
 {
-	__set_fixmap(FIX_F00F_IDT, __pa(&idt_table), PAGE_KERNEL_RO);
-
-	/*
-	 * Update the IDT descriptor and reload the IDT so that
-	 * it uses the read-only mapped virtual address.
-	 */
-	idt_descr.address = fix_to_virt(FIX_F00F_IDT);
-	load_idt(&idt_descr);
 }
 #endif
 
arch/i386/mm/fault-xen.c +1 -1
Index: head-2006-02-14/arch/i386/mm/fault-xen.c
===================================================================
@@ -469,7 +469,7 @@ bad_area_nosemaphore:
 		return;
 	}
 
-#ifdef CONFIG_X86_F00F_BUG
+#if 0
 	/*
 	 * Pentium F0 0F C7 C8 bug workaround.
 	 */

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel