search for: idt_entries

Displaying 20 results from an estimated 65 matches for "idt_entries".

Did you mean: gdt_entries
2020 Feb 11
0
[PATCH 23/62] x86/idt: Move IDT to data segment
....c b/arch/x86/kernel/idt.c index 87ef69a72c52..7f81c1294847 100644 --- a/arch/x86/kernel/idt.c +++ b/arch/x86/kernel/idt.c @@ -166,7 +166,7 @@ static const __initconst struct idt_data dbg_idts[] = { #endif /* Must be page-aligned because the real IDT is used in a fixmap. */ -gate_desc idt_table[IDT_ENTRIES] __page_aligned_bss; +gate_desc idt_table[IDT_ENTRIES] __page_aligned_data; struct desc_ptr idt_descr __ro_after_init = { .size = (IDT_ENTRIES * 2 * sizeof(unsigned long)) - 1, -- 2.17.1
2020 Jul 14
0
[PATCH v4 27/75] x86/idt: Move IDT to data segment
.../kernel/idt.c index 0db21206f2f3..b920f2352df5 100644 --- a/arch/x86/kernel/idt.c +++ b/arch/x86/kernel/idt.c @@ -158,7 +158,7 @@ static const __initconst struct idt_data apic_idts[] = { }; /* Must be page-aligned because the real IDT is used in the cpu entry area */ -static gate_desc idt_table[IDT_ENTRIES] __page_aligned_bss; +static gate_desc idt_table[IDT_ENTRIES] __page_aligned_data; struct desc_ptr idt_descr __ro_after_init = { .size = IDT_TABLE_SIZE - 1, -- 2.27.0
2007 Apr 18
2
[patch 3/8] Allow a kernel to not be in ring 0.
...c) == GDT_ENTRY_KERNEL_CS * 8) +/* Matches PNP_CS32 and PNP_CS16 (they must be consecutive) */ +#define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8) + /* Simple and small GDT entries for booting only */ #define GDT_ENTRY_BOOT_CS 2 @@ -112,4 +117,11 @@ */ #define IDT_ENTRIES 256 +/* Bottom three bits of xcs give the ring privilege level */ +#define SEGMENT_RPL_MASK 0x3 + +/* User mode is privilege level 3 */ +#define USER_RPL 0x3 + +#define get_kernel_rpl() 0 #endif -- Chuck
2007 Apr 18
2
[patch 3/8] Allow a kernel to not be in ring 0.
...c) == GDT_ENTRY_KERNEL_CS * 8) +/* Matches PNP_CS32 and PNP_CS16 (they must be consecutive) */ +#define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8) + /* Simple and small GDT entries for booting only */ #define GDT_ENTRY_BOOT_CS 2 @@ -112,4 +117,11 @@ */ #define IDT_ENTRIES 256 +/* Bottom three bits of xcs give the ring privilege level */ +#define SEGMENT_RPL_MASK 0x3 + +/* User mode is privilege level 3 */ +#define USER_RPL 0x3 + +#define get_kernel_rpl() 0 #endif -- Chuck
2007 Apr 18
1
[RFC/PATCH PV_OPS X86_64 05/17] pravirt_ops - segments
...rt/include/asm-x86_64/segment.h @@ -37,8 +37,14 @@ #define GS_TLS_SEL ((GDT_ENTRY_TLS_MIN+GS_TLS)*8 + 3) #define FS_TLS_SEL ((GDT_ENTRY_TLS_MIN+FS_TLS)*8 + 3) +#define __HV_CS 0x80 /* 16*8 */ +#define __HV_DS 0x88 /* 17*8 */ + +#define GDT_ENTRY_HV_CS 16 +#define GDT_ENTRY_HV_DS 17 + #define IDT_ENTRIES 256 -#define GDT_ENTRIES 16 +#define GDT_ENTRIES 18 #define GDT_SIZE (GDT_ENTRIES * 8) #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8) --
2007 Apr 18
0
[PATCH 17/21] i386 Ldt cleanups 1
...86/segment.h =================================================================== --- linux-2.6.14-zach-work.orig/include/asm-i386/segment.h 2005-11-04 15:46:51.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/segment.h 2005-11-04 18:22:07.000000000 -0800 @@ -121,4 +121,9 @@ */ #define IDT_ENTRIES 256 +/* + * This bit is set to indicate segment selectors are in the LDT + */ +#define LDT_SEGMENT 4 + #endif Index: linux-2.6.14-zach-work/include/asm-i386/ldt.h =================================================================== --- linux-2.6.14-zach-work.orig/include/asm-i386/ldt.h 2005-10-27...
2007 Apr 18
0
[PATCH 17/21] i386 Ldt cleanups 1
...86/segment.h =================================================================== --- linux-2.6.14-zach-work.orig/include/asm-i386/segment.h 2005-11-04 15:46:51.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/segment.h 2005-11-04 18:22:07.000000000 -0800 @@ -121,4 +121,9 @@ */ #define IDT_ENTRIES 256 +/* + * This bit is set to indicate segment selectors are in the LDT + */ +#define LDT_SEGMENT 4 + #endif Index: linux-2.6.14-zach-work/include/asm-i386/ldt.h =================================================================== --- linux-2.6.14-zach-work.orig/include/asm-i386/ldt.h 2005-10-27...
2007 Apr 18
1
[RFC/PATCH PV_OPS X86_64 05/17] pravirt_ops - segments
...rt/include/asm-x86_64/segment.h @@ -37,8 +37,14 @@ #define GS_TLS_SEL ((GDT_ENTRY_TLS_MIN+GS_TLS)*8 + 3) #define FS_TLS_SEL ((GDT_ENTRY_TLS_MIN+FS_TLS)*8 + 3) +#define __HV_CS 0x80 /* 16*8 */ +#define __HV_DS 0x88 /* 17*8 */ + +#define GDT_ENTRY_HV_CS 16 +#define GDT_ENTRY_HV_DS 17 + #define IDT_ENTRIES 256 -#define GDT_ENTRIES 16 +#define GDT_ENTRIES 18 #define GDT_SIZE (GDT_ENTRIES * 8) #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8) --
2007 Apr 18
1
[PATCH 6/14] i386 / Add some segment convenience functions
...2.6.13/include/asm-i386/segment.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/segment.h 2005-08-09 19:36:36.000000000 -0700 +++ linux-2.6.13/include/asm-i386/segment.h 2005-08-09 19:43:47.000000000 -0700 @@ -98,4 +98,14 @@ */ #define IDT_ENTRIES 256 +/* + * This bit is set to indicate segment selectors are in the LDT + */ +#define LDT_SEGMENT 4 + +#ifndef __ASSEMBLY__ +#define segment_index(seg) ((seg) >> 3) +#define segment_from_ldt(seg) ((seg) & LDT_SEGMENT) +#endif + #endif Index: linux-2.6.13/arch/i386/kernel/ptrace.c ====...
2007 Apr 18
1
[PATCH 6/14] i386 / Add some segment convenience functions
...2.6.13/include/asm-i386/segment.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/segment.h 2005-08-09 19:36:36.000000000 -0700 +++ linux-2.6.13/include/asm-i386/segment.h 2005-08-09 19:43:47.000000000 -0700 @@ -98,4 +98,14 @@ */ #define IDT_ENTRIES 256 +/* + * This bit is set to indicate segment selectors are in the LDT + */ +#define LDT_SEGMENT 4 + +#ifndef __ASSEMBLY__ +#define segment_index(seg) ((seg) >> 3) +#define segment_from_ldt(seg) ((seg) & LDT_SEGMENT) +#endif + #endif Index: linux-2.6.13/arch/i386/kernel/ptrace.c ====...
2007 Apr 18
1
[PATCH] Slight cleanups for x86 ring macros (against rc3-mm2)
...IS_FLAT_CODE(x) (((x) & 0xec) == GDT_ENTRY_KERNEL_CS * 8) +/* Matches PNP_CS32 and PNP_CS16 (they must be consecutive) */ #define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8) /* Simple and small GDT entries for booting only */ @@ -118,8 +117,16 @@ */ #define IDT_ENTRIES 256 -/* Bottom three bits of xcs give the ring privilege level */ -#define SEGMENT_RPL_MASK 0x3 +/* Bottom two bits of selector give the ring privilege level */ +#define SEGMENT_RPL_MASK 0x3 +/* Bit 2 is table indicator (LDT/GDT) */ +#define SEGMENT_TI_MASK 0x4 + +/* User mode is privilege level...
2007 Apr 18
1
[PATCH] Slight cleanups for x86 ring macros (against rc3-mm2)
...IS_FLAT_CODE(x) (((x) & 0xec) == GDT_ENTRY_KERNEL_CS * 8) +/* Matches PNP_CS32 and PNP_CS16 (they must be consecutive) */ #define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8) /* Simple and small GDT entries for booting only */ @@ -118,8 +117,16 @@ */ #define IDT_ENTRIES 256 -/* Bottom three bits of xcs give the ring privilege level */ -#define SEGMENT_RPL_MASK 0x3 +/* Bottom two bits of selector give the ring privilege level */ +#define SEGMENT_RPL_MASK 0x3 +/* Bit 2 is table indicator (LDT/GDT) */ +#define SEGMENT_TI_MASK 0x4 + +/* User mode is privilege level...
2007 Apr 18
2
[RFC, PATCH 9/24] i386 Vmi smp support
...per-cpu GDT. */ + memcpy(get_cpu_gdt_table(phys_apicid), cpu_gdt_table, + GDT_SIZE); + ap.gdtr_limit = GDT_SIZE - 1; + ap.gdtr_base = (unsigned long) get_cpu_gdt_table(phys_apicid); + + ap.idtr_limit = IDT_ENTRIES * 8 - 1; + ap.idtr_base = (unsigned long) idt_table; + + ap.ldtr = 0; + + ap.cs = __KERNEL_CS; + ap.eip = (unsigned long) start_eip; + ap.ss = __KERNEL_DS; + ap.esp = (unsigned long) start_esp;...
2007 Apr 18
2
[RFC, PATCH 9/24] i386 Vmi smp support
...per-cpu GDT. */ + memcpy(get_cpu_gdt_table(phys_apicid), cpu_gdt_table, + GDT_SIZE); + ap.gdtr_limit = GDT_SIZE - 1; + ap.gdtr_base = (unsigned long) get_cpu_gdt_table(phys_apicid); + + ap.idtr_limit = IDT_ENTRIES * 8 - 1; + ap.idtr_base = (unsigned long) idt_table; + + ap.ldtr = 0; + + ap.cs = __KERNEL_CS; + ap.eip = (unsigned long) start_eip; + ap.ss = __KERNEL_DS; + ap.esp = (unsigned long) start_esp;...
2007 Apr 18
0
[PATCH] lguest: Compile hypervisor.S into the lg module directly
...de "lg.h" -/* This is our hypervisor, compiled from hypervisor.S. */ -static char __initdata hypervisor_blob[] = { -#include "hypervisor-blob.c" -}; +/* Found in hypervisor.S */ +extern char start_hyper_text[], end_hyper_text[], switch_to_guest[]; +extern unsigned long default_idt_entries[]; /* Every guest maps the core hypervisor blob. */ -#define SHARED_HYPERVISOR_PAGES DIV_ROUND_UP(sizeof(hypervisor_blob),PAGE_SIZE) +#define SHARED_HYPERVISOR_PAGES \ + DIV_ROUND_UP(end_hyper_text - start_hyper_text, PAGE_SIZE) +/* Pages for hypervisor itself, then two pages per cpu */ +#define...
2007 Apr 18
0
[PATCH] lguest: Compile hypervisor.S into the lg module directly
...de "lg.h" -/* This is our hypervisor, compiled from hypervisor.S. */ -static char __initdata hypervisor_blob[] = { -#include "hypervisor-blob.c" -}; +/* Found in hypervisor.S */ +extern char start_hyper_text[], end_hyper_text[], switch_to_guest[]; +extern unsigned long default_idt_entries[]; /* Every guest maps the core hypervisor blob. */ -#define SHARED_HYPERVISOR_PAGES DIV_ROUND_UP(sizeof(hypervisor_blob),PAGE_SIZE) +#define SHARED_HYPERVISOR_PAGES \ + DIV_ROUND_UP(end_hyper_text - start_hyper_text, PAGE_SIZE) +/* Pages for hypervisor itself, then two pages per cpu */ +#define...
2010 Aug 23
1
Removing VMI kernel support from 2.6.37
...- unsigned long start_esp) -{ - struct vmi_ap_state ap; - - /* Default everything to zero. This is fine for most GPRs. */ - memset(&ap, 0, sizeof(struct vmi_ap_state)); - - ap.gdtr_limit = GDT_SIZE - 1; - ap.gdtr_base = (unsigned long) get_cpu_gdt_table(phys_apicid); - - ap.idtr_limit = IDT_ENTRIES * 8 - 1; - ap.idtr_base = (unsigned long) idt_table; - - ap.ldtr = 0; - - ap.cs = __KERNEL_CS; - ap.eip = (unsigned long) start_eip; - ap.ss = __KERNEL_DS; - ap.esp = (unsigned long) start_esp; - - ap.ds = __USER_DS; - ap.es = __USER_DS; - ap.fs = __KERNEL_PERCPU; - ap.gs = __KERNEL_STACK_CANARY; -...
2010 Aug 23
1
Removing VMI kernel support from 2.6.37
...- unsigned long start_esp) -{ - struct vmi_ap_state ap; - - /* Default everything to zero. This is fine for most GPRs. */ - memset(&ap, 0, sizeof(struct vmi_ap_state)); - - ap.gdtr_limit = GDT_SIZE - 1; - ap.gdtr_base = (unsigned long) get_cpu_gdt_table(phys_apicid); - - ap.idtr_limit = IDT_ENTRIES * 8 - 1; - ap.idtr_base = (unsigned long) idt_table; - - ap.ldtr = 0; - - ap.cs = __KERNEL_CS; - ap.eip = (unsigned long) start_eip; - ap.ss = __KERNEL_DS; - ap.esp = (unsigned long) start_esp; - - ap.ds = __USER_DS; - ap.es = __USER_DS; - ap.fs = __KERNEL_PERCPU; - ap.gs = __KERNEL_STACK_CANARY; -...
2007 Apr 18
1
[PATCH 0/7] Using %gs for per-cpu areas on x86
OK, here it is. Benchmarks still coming. This is against Andi's 2.6.18-rc7-git3 tree, and replaces the patches between (and not including) i386-pda-asm-offsets and i386-early-fault. One patch is identical, one is mildly modified, the rest are re-implemented but inspired by Jeremy's PDA work. Thanks, Rusty. -- Help! Save Australia from the worst of the DMCA: http://linux.org.au/law
2007 Apr 18
1
[PATCH 0/7] Using %gs for per-cpu areas on x86
OK, here it is. Benchmarks still coming. This is against Andi's 2.6.18-rc7-git3 tree, and replaces the patches between (and not including) i386-pda-asm-offsets and i386-early-fault. One patch is identical, one is mildly modified, the rest are re-implemented but inspired by Jeremy's PDA work. Thanks, Rusty. -- Help! Save Australia from the worst of the DMCA: http://linux.org.au/law