search for: gdt_size

Displaying 20 results from an estimated 72 matches for "gdt_size".

2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...pu); __u32 stk16_off = (__u32)&per_cpu(cpu_16bit_stack, cpu); if (cpu_test_and_set(cpu, cpu_initialized)) { @@ -594,18 +595,16 @@ * Initialize the per-CPU GDT with the boot GDT, * and set up the GDT descriptor: */ - memcpy(&per_cpu(cpu_gdt_table, cpu), cpu_gdt_table, - GDT_SIZE); + memcpy(gdt, cpu_gdt_table, GDT_SIZE); /* Set up GDT entry for 16bit stack */ - *(__u64 *)&(per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_ESPFIX_SS]) |= + *(__u64 *)(&gdt[GDT_ENTRY_ESPFIX_SS]) |= ((((__u64)stk16_off) << 16) & 0x000000ffffff0000ULL) | ((((__u64)stk16_off) &l...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...pu); __u32 stk16_off = (__u32)&per_cpu(cpu_16bit_stack, cpu); if (cpu_test_and_set(cpu, cpu_initialized)) { @@ -594,18 +595,16 @@ * Initialize the per-CPU GDT with the boot GDT, * and set up the GDT descriptor: */ - memcpy(&per_cpu(cpu_gdt_table, cpu), cpu_gdt_table, - GDT_SIZE); + memcpy(gdt, cpu_gdt_table, GDT_SIZE); /* Set up GDT entry for 16bit stack */ - *(__u64 *)&(per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_ESPFIX_SS]) |= + *(__u64 *)(&gdt[GDT_ENTRY_ESPFIX_SS]) |= ((((__u64)stk16_off) << 16) & 0x000000ffffff0000ULL) | ((((__u64)stk16_off) &l...
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
...2)&per_cpu(cpu_16bit_stack, cpu); if (cpu_test_and_set(cpu, cpu_initialized)) { @@ -594,18 +595,16 @@ void __devinit cpu_init(void) * Initialize the per-CPU GDT with the boot GDT, * and set up the GDT descriptor: */ - memcpy(&per_cpu(cpu_gdt_table, cpu), cpu_gdt_table, - GDT_SIZE); + memcpy(gdt, cpu_gdt_table, GDT_SIZE); /* Set up GDT entry for 16bit stack */ - *(__u64 *)&(per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_ESPFIX_SS]) |= + *(__u64 *)(&gdt[GDT_ENTRY_ESPFIX_SS]) |= ((((__u64)stk16_off) << 16) & 0x000000ffffff0000ULL) | ((((__u64)stk16_off) &l...
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
...2)&per_cpu(cpu_16bit_stack, cpu); if (cpu_test_and_set(cpu, cpu_initialized)) { @@ -594,18 +595,16 @@ void __devinit cpu_init(void) * Initialize the per-CPU GDT with the boot GDT, * and set up the GDT descriptor: */ - memcpy(&per_cpu(cpu_gdt_table, cpu), cpu_gdt_table, - GDT_SIZE); + memcpy(gdt, cpu_gdt_table, GDT_SIZE); /* Set up GDT entry for 16bit stack */ - *(__u64 *)&(per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_ESPFIX_SS]) |= + *(__u64 *)(&gdt[GDT_ENTRY_ESPFIX_SS]) |= ((((__u64)stk16_off) << 16) & 0x000000ffffff0000ULL) | ((((__u64)stk16_off) &l...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
...pu); __u32 stk16_off = (__u32)&per_cpu(cpu_16bit_stack, cpu); if (cpu_test_and_set(cpu, cpu_initialized)) { @@ -594,18 +595,16 @@ * Initialize the per-CPU GDT with the boot GDT, * and set up the GDT descriptor: */ - memcpy(&per_cpu(cpu_gdt_table, cpu), cpu_gdt_table, - GDT_SIZE); + memcpy(gdt, cpu_gdt_table, GDT_SIZE); /* Set up GDT entry for 16bit stack */ - *(__u64 *)&(per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_ESPFIX_SS]) |= + *(__u64 *)(&gdt[GDT_ENTRY_ESPFIX_SS]) |= ((((__u64)stk16_off) << 16) & 0x000000ffffff0000ULL) | ((((__u64)stk16_off) &l...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
...pu); __u32 stk16_off = (__u32)&per_cpu(cpu_16bit_stack, cpu); if (cpu_test_and_set(cpu, cpu_initialized)) { @@ -594,18 +595,16 @@ * Initialize the per-CPU GDT with the boot GDT, * and set up the GDT descriptor: */ - memcpy(&per_cpu(cpu_gdt_table, cpu), cpu_gdt_table, - GDT_SIZE); + memcpy(gdt, cpu_gdt_table, GDT_SIZE); /* Set up GDT entry for 16bit stack */ - *(__u64 *)&(per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_ESPFIX_SS]) |= + *(__u64 *)(&gdt[GDT_ENTRY_ESPFIX_SS]) |= ((((__u64)stk16_off) << 16) & 0x000000ffffff0000ULL) | ((((__u64)stk16_off) &l...
2007 Apr 18
4
paravirt repo rebased to 2.6.21-rc6-mm1
Seems to work OK for native and Xen. I had to play a bit with the paravirt-sched-clock patch to deal with the VMI changes. Zach, can you check that it still works? Thanks, J
2007 Apr 18
4
paravirt repo rebased to 2.6.21-rc6-mm1
Seems to work OK for native and Xen. I had to play a bit with the paravirt-sched-clock patch to deal with the VMI changes. Zach, can you check that it still works? Thanks, J
2007 Apr 18
2
[RFC, PATCH 9/24] i386 Vmi smp support
...ervisor_found) { + /* Default everything to zero. This is fine for most GPRs. */ + memset(&ap, 0, sizeof(APState)); + + /* Set up AP's 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; +...
2007 Apr 18
2
[RFC, PATCH 9/24] i386 Vmi smp support
...ervisor_found) { + /* Default everything to zero. This is fine for most GPRs. */ + memset(&ap, 0, sizeof(APState)); + + /* Set up AP's 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; +...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 10/17] paravirt_ops - boot changes
...EF_IE|0x3000); } +/* Overriden in paravirt.c if CONFIG_PARAVIRT */ +void __attribute__((weak)) syscall_init(void) +{ + x86_64_syscall_init(); +} + void __cpuinit check_efer(void) { unsigned long efer; @@ -223,8 +229,8 @@ void __cpuinit cpu_init (void) memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE); cpu_gdt_descr[cpu].size = GDT_SIZE; - asm volatile("lgdt %0" :: "m" (cpu_gdt_descr[cpu])); - asm volatile("lidt %0" :: "m" (idt_descr)); + load_gdt((const struct desc_ptr *)&cpu_gdt_descr[cpu]); + load_idt((const struct desc_ptr *)&idt_descr);...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 10/17] paravirt_ops - boot changes
...EF_IE|0x3000); } +/* Overriden in paravirt.c if CONFIG_PARAVIRT */ +void __attribute__((weak)) syscall_init(void) +{ + x86_64_syscall_init(); +} + void __cpuinit check_efer(void) { unsigned long efer; @@ -223,8 +229,8 @@ void __cpuinit cpu_init (void) memcpy(cpu_gdt(cpu), cpu_gdt_table, GDT_SIZE); cpu_gdt_descr[cpu].size = GDT_SIZE; - asm volatile("lgdt %0" :: "m" (cpu_gdt_descr[cpu])); - asm volatile("lidt %0" :: "m" (idt_descr)); + load_gdt((const struct desc_ptr *)&cpu_gdt_descr[cpu]); + load_idt((const struct desc_ptr *)&idt_descr);...
2007 Apr 18
2
[patch 3/8] Allow a kernel to not be in ring 0.
...K) | (regs->eflags & VM_MASK)) >= USER_RPL; } #define instruction_pointer(regs) ((regs)->eip) #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) --- 2.6.18-rc3-32.orig/include/asm-i386/segment.h +++ 2.6.18-rc3-32/include/asm-i386/segment.h @@ -83,6 +83,11 @@ #define GDT_SIZE (GDT_ENTRIES * 8) +/* Matches __KERNEL_CS and __USER_CS (they must be 2 entries apart) */ +#define SEGMENT_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_ENTR...
2007 Apr 18
2
[patch 3/8] Allow a kernel to not be in ring 0.
...K) | (regs->eflags & VM_MASK)) >= USER_RPL; } #define instruction_pointer(regs) ((regs)->eip) #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) --- 2.6.18-rc3-32.orig/include/asm-i386/segment.h +++ 2.6.18-rc3-32/include/asm-i386/segment.h @@ -83,6 +83,11 @@ #define GDT_SIZE (GDT_ENTRIES * 8) +/* Matches __KERNEL_CS and __USER_CS (they must be 2 entries apart) */ +#define SEGMENT_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_ENTR...
2007 Apr 18
1
[RFC/PATCH PV_OPS X86_64 05/17] pravirt_ops - segments
...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 10/21] i386 Use protected segment for 16bit stack
...((((__u64)stk16_off) << 16) & 0x000000ffffff0000ULL) | - ((((__u64)stk16_off) << 32) & 0xff00000000000000ULL) | - (CPU_16BIT_STACK_SIZE - 1); + prepare_protected_segment(cpu, GDT_ENTRY_ESPFIX_SS, (void *) stk16_off, + CPU_16BIT_STACK_SIZE); cpu_gdt_descr[cpu].size = GDT_SIZE - 1; cpu_gdt_descr[cpu].address = (unsigned long)gdt;
2007 Apr 18
0
[PATCH 10/21] i386 Use protected segment for 16bit stack
...((((__u64)stk16_off) << 16) & 0x000000ffffff0000ULL) | - ((((__u64)stk16_off) << 32) & 0xff00000000000000ULL) | - (CPU_16BIT_STACK_SIZE - 1); + prepare_protected_segment(cpu, GDT_ENTRY_ESPFIX_SS, (void *) stk16_off, + CPU_16BIT_STACK_SIZE); cpu_gdt_descr[cpu].size = GDT_SIZE - 1; cpu_gdt_descr[cpu].address = (unsigned long)gdt;
2007 Apr 18
1
[RFC/PATCH PV_OPS X86_64 05/17] pravirt_ops - segments
...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] Slight cleanups for x86 ring macros (against rc3-mm2)
...uction_pointer(regs) ((regs)->eip) extern unsigned long profile_pc(struct pt_regs *regs); diff -r d8064f9b5964 include/asm-i386/segment.h --- a/include/asm-i386/segment.h Mon Aug 07 13:30:17 2006 +1000 +++ b/include/asm-i386/segment.h Mon Aug 07 14:32:11 2006 +1000 @@ -83,10 +83,9 @@ #define GDT_SIZE (GDT_ENTRIES * 8) -/* - * Some tricky tests to match code segments after a fault - */ +/* Matches __KERNEL_CS and __USER_CS (they must be 2 entries apart) */ #define SEGMENT_IS_FLAT_CODE(x) (((x) & 0xec) == GDT_ENTRY_KERNEL_CS * 8) +/* Matches PNP_CS32 and PNP_CS16 (they must be consecutive...
2007 Apr 18
1
[PATCH] Slight cleanups for x86 ring macros (against rc3-mm2)
...uction_pointer(regs) ((regs)->eip) extern unsigned long profile_pc(struct pt_regs *regs); diff -r d8064f9b5964 include/asm-i386/segment.h --- a/include/asm-i386/segment.h Mon Aug 07 13:30:17 2006 +1000 +++ b/include/asm-i386/segment.h Mon Aug 07 14:32:11 2006 +1000 @@ -83,10 +83,9 @@ #define GDT_SIZE (GDT_ENTRIES * 8) -/* - * Some tricky tests to match code segments after a fault - */ +/* Matches __KERNEL_CS and __USER_CS (they must be 2 entries apart) */ #define SEGMENT_IS_FLAT_CODE(x) (((x) & 0xec) == GDT_ENTRY_KERNEL_CS * 8) +/* Matches PNP_CS32 and PNP_CS16 (they must be consecutive...