search for: gdt_entry_tls_min

Displaying 20 results from an estimated 95 matches for "gdt_entry_tls_min".

2007 Apr 18
1
[RFC/PATCH PV_OPS X86_64 05/17] pravirt_ops - segments
...r de Oliveira Costa <gcosta@redhat.com> Index: clean-start/include/asm-x86_64/segment.h =================================================================== --- clean-start.orig/include/asm-x86_64/segment.h +++ clean-start/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_ENT...
2007 Apr 18
1
[RFC/PATCH PV_OPS X86_64 05/17] pravirt_ops - segments
...r de Oliveira Costa <gcosta@redhat.com> Index: clean-start/include/asm-x86_64/segment.h =================================================================== --- clean-start.orig/include/asm-x86_64/segment.h +++ clean-start/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_ENT...
2007 Apr 18
1
[PATCH 4/12] tls-unnecessary-init
The per-CPU initialization code is copying in bogus data into thread->tls_array. Note that it copies &per_cpu(cpu_gdt_table, cpu), not &per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN). That is totally broken and unnecessary. Make the initialization explicitly NULL. Signed-off-by: Zachary Amsden <zach@vmware.com Index: linux-2.6.13/include/asm-i386/processor.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/process...
2007 Apr 18
1
[PATCH 4/12] tls-unnecessary-init
The per-CPU initialization code is copying in bogus data into thread->tls_array. Note that it copies &per_cpu(cpu_gdt_table, cpu), not &per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN). That is totally broken and unnecessary. Make the initialization explicitly NULL. Signed-off-by: Zachary Amsden <zach@vmware.com Index: linux-2.6.13/include/asm-i386/processor.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/process...
2007 Apr 18
0
[PATCH 10/12] yet-another-redundant-accessor
...mp; 1) -#define GET_PRESENT(desc) (((desc)->b >> 15) & 1) -#define GET_USEABLE(desc) (((desc)->b >> 20) & 1) - asmlinkage int sys_get_thread_area(struct user_desc __user *u_info) { struct user_desc info; @@ -934,7 +914,7 @@ desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN; info.entry_number = idx; - info.base_addr = GET_BASE(desc); + info.base_addr = get_desc_base(desc); info.limit = GET_LIMIT(desc); info.seg_32bit = GET_32BIT(desc); info.contents = GET_CONTENTS(desc); Index: linux-2.6.13/arch/i386/kernel/ptrace.c ==========================================...
2007 Apr 18
0
[PATCH 10/12] yet-another-redundant-accessor
...mp; 1) -#define GET_PRESENT(desc) (((desc)->b >> 15) & 1) -#define GET_USEABLE(desc) (((desc)->b >> 20) & 1) - asmlinkage int sys_get_thread_area(struct user_desc __user *u_info) { struct user_desc info; @@ -934,7 +914,7 @@ desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN; info.entry_number = idx; - info.base_addr = GET_BASE(desc); + info.base_addr = get_desc_base(desc); info.limit = GET_LIMIT(desc); info.seg_32bit = GET_32BIT(desc); info.contents = GET_CONTENTS(desc); Index: linux-2.6.13/arch/i386/kernel/ptrace.c ==========================================...
2007 Apr 18
0
[PATCH 11/14] i386 / Eliminate yet another redundant accessor
...)->b >> 15) & 1) -#define GET_USEABLE(desc) (((desc)->b >> 20) & 1) - asmlinkage int sys_get_thread_area(struct user_desc __user *u_info) { struct user_desc info; @@ -932,16 +912,7 @@ memset(&info, 0, sizeof(info)); desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN; - - info.entry_number = idx; - info.base_addr = GET_BASE(desc); - info.limit = GET_LIMIT(desc); - info.seg_32bit = GET_32BIT(desc); - info.contents = GET_CONTENTS(desc); - info.read_exec_only = !GET_WRITABLE(desc); - info.limit_in_pages = GET_LIMIT_PAGES(desc); - info.seg_not_present = !GET_PRESEN...
2007 Apr 18
0
[PATCH 11/14] i386 / Eliminate yet another redundant accessor
...)->b >> 15) & 1) -#define GET_USEABLE(desc) (((desc)->b >> 20) & 1) - asmlinkage int sys_get_thread_area(struct user_desc __user *u_info) { struct user_desc info; @@ -932,16 +912,7 @@ memset(&info, 0, sizeof(info)); desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN; - - info.entry_number = idx; - info.base_addr = GET_BASE(desc); - info.limit = GET_LIMIT(desc); - info.seg_32bit = GET_32BIT(desc); - info.contents = GET_CONTENTS(desc); - info.read_exec_only = !GET_WRITABLE(desc); - info.limit_in_pages = GET_LIMIT_PAGES(desc); - info.seg_not_present = !GET_PRESEN...
2007 Apr 18
2
[PATCH 16/21] i386 Eliminate duplicate segment macros
...sc)->b >> 20) & 1) - asmlinkage int sys_get_thread_area(struct user_desc __user *u_info) { struct user_desc info; @@ -913,19 +893,8 @@ asmlinkage int sys_get_thread_area(struc return -EINVAL; memset(&info, 0, sizeof(info)); - desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN; - - info.entry_number = idx; - info.base_addr = GET_BASE(desc); - info.limit = GET_LIMIT(desc); - info.seg_32bit = GET_32BIT(desc); - info.contents = GET_CONTENTS(desc); - info.read_exec_only = !GET_WRITABLE(desc); - info.limit_in_pages = GET_LIMIT_PAGES(desc); - info.seg_not_present = !GET_PRESEN...
2007 Apr 18
2
[PATCH 16/21] i386 Eliminate duplicate segment macros
...sc)->b >> 20) & 1) - asmlinkage int sys_get_thread_area(struct user_desc __user *u_info) { struct user_desc info; @@ -913,19 +893,8 @@ asmlinkage int sys_get_thread_area(struc return -EINVAL; memset(&info, 0, sizeof(info)); - desc = current->thread.tls_array + idx - GDT_ENTRY_TLS_MIN; - - info.entry_number = idx; - info.base_addr = GET_BASE(desc); - info.limit = GET_LIMIT(desc); - info.seg_32bit = GET_32BIT(desc); - info.contents = GET_CONTENTS(desc); - info.read_exec_only = !GET_WRITABLE(desc); - info.limit_in_pages = GET_LIMIT_PAGES(desc); - info.seg_not_present = !GET_PRESEN...
2007 Apr 18
1
[PATCH 1/3] Bogus tls from gdt
The per-CPU initialization code is copying in bogus data into thread->tls_array. Note that it copies &per_cpu(cpu_gdt_table, cpu), not &per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN). That is totally broken and unnecessary. Make the initialization explicitly NULL. Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.14-rc1/arch/i386/kernel/cpu/common.c =================================================================== --- linux-2.6.14-rc1.orig/arch/i386/...
2007 Apr 18
0
[PATCH 3/12] tls-is-ugly
...linux-2.6.13/include/asm-i386/desc.h 2005-08-08 14:53:11.000000000 -0700 @@ -106,15 +106,9 @@ ldt[entry].b = entry_b; } -#if TLS_SIZE != 24 -# error update this code. -#endif - static inline void load_TLS(struct thread_struct *t, unsigned int cpu) { -#define C(i) per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] - C(0); C(1); C(2); -#undef C + memcpy(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); } static inline void clear_LDT(void)
2007 Apr 18
0
[PATCH 2/14] i386 / Remove ugly tls code
...inux-2.6.13/include/asm-i386/mach-default/mach_desc.h 2005-08-10 20:44:46.000000000 -0700 @@ -70,15 +70,9 @@ return 0; } -#if TLS_SIZE != 24 -# error update this code. -#endif - static inline void load_TLS(struct thread_struct *t, unsigned int cpu) { -#define C(i) per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] - C(0); C(1); C(2); -#undef C + memcpy(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); } - + #endif
2007 Apr 18
0
[PATCH 3/12] tls-is-ugly
...linux-2.6.13/include/asm-i386/desc.h 2005-08-08 14:53:11.000000000 -0700 @@ -106,15 +106,9 @@ ldt[entry].b = entry_b; } -#if TLS_SIZE != 24 -# error update this code. -#endif - static inline void load_TLS(struct thread_struct *t, unsigned int cpu) { -#define C(i) per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] - C(0); C(1); C(2); -#undef C + memcpy(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); } static inline void clear_LDT(void)
2007 Apr 18
0
[PATCH 2/14] i386 / Remove ugly tls code
...inux-2.6.13/include/asm-i386/mach-default/mach_desc.h 2005-08-10 20:44:46.000000000 -0700 @@ -70,15 +70,9 @@ return 0; } -#if TLS_SIZE != 24 -# error update this code. -#endif - static inline void load_TLS(struct thread_struct *t, unsigned int cpu) { -#define C(i) per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] - C(0); C(1); C(2); -#undef C + memcpy(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); } - + #endif
2007 Apr 18
1
[PATCH 1/3] Bogus tls from gdt
The per-CPU initialization code is copying in bogus data into thread->tls_array. Note that it copies &per_cpu(cpu_gdt_table, cpu), not &per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN). That is totally broken and unnecessary. Make the initialization explicitly NULL. Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.14-rc1/arch/i386/kernel/cpu/common.c =================================================================== --- linux-2.6.14-rc1.orig/arch/i386/...
2007 Apr 18
0
[PATCH 11/12] subarch-desc
...fo)->useable == 0 ) -static inline void write_ldt_entry(struct desc_struct *ldt, int entry, __u32 entry_a, __u32 entry_b) -{ - ldt[entry].a = entry_a; - ldt[entry].b = entry_b; -} - -static inline void load_TLS(struct thread_struct *t, unsigned int cpu) -{ - memcpy(&get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); -} - static inline void clear_LDT(void) { int cpu = get_cpu(); Index: linux-2.6.13/include/asm-i386/mach-default/mach_desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/mach-default/mach_desc.h 2005-08-...
2007 Apr 18
0
[PATCH 11/12] subarch-desc
...fo)->useable == 0 ) -static inline void write_ldt_entry(struct desc_struct *ldt, int entry, __u32 entry_a, __u32 entry_b) -{ - ldt[entry].a = entry_a; - ldt[entry].b = entry_b; -} - -static inline void load_TLS(struct thread_struct *t, unsigned int cpu) -{ - memcpy(&get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); -} - static inline void clear_LDT(void) { int cpu = get_cpu(); Index: linux-2.6.13/include/asm-i386/mach-default/mach_desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/mach-default/mach_desc.h 2005-08-...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...<< 3)-1), 0x82); + _set_tssldt_desc(&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82); } #define LDT_entry_a(info) \ @@ -112,7 +114,7 @@ static inline void load_TLS(struct thread_struct *t, unsigned int cpu) { - memcpy(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); + memcpy(&get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); } static inline void clear_LDT(void) Index: linux-2.6.13/arch/i386/kernel/apm.c =================================================================== --- linux-2.6.13.orig/arch/i386/...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...<< 3)-1), 0x82); + _set_tssldt_desc(&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82); } #define LDT_entry_a(info) \ @@ -112,7 +114,7 @@ static inline void load_TLS(struct thread_struct *t, unsigned int cpu) { - memcpy(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); + memcpy(&get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN], t->tls_array, TLS_SIZE); } static inline void clear_LDT(void) Index: linux-2.6.13/arch/i386/kernel/apm.c =================================================================== --- linux-2.6.13.orig/arch/i386/...