search for: get_cpu_gdt_table

Displaying 20 results from an estimated 137 matches for "get_cpu_gdt_table".

2007 Apr 18
0
[PATCH 1/3] Gdt page isolation fix
...oscalls.c 2005-09-28 13:13:42.000000000 -0700 @@ -69,14 +69,14 @@ __asm__( #define Q_SET_SEL(cpu, selname, address, size) \ do { \ -set_base(per_cpu(cpu_gdt_table,cpu)[(selname) >> 3], __va((u32)(address))); \ -set_limit(per_cpu(cpu_gdt_table,cpu)[(selname) >> 3], size); \ +set_base(get_cpu_gdt_table(cpu)[(selname) >> 3], __va((u32)(address))); \ +set_limit(get_cpu_gdt_table(cpu)[(selname) >> 3], size); \ } while(0) #define Q2_SET_SEL(cpu, selname, address, size) \ do { \ -set_base(per_cpu(cpu_gdt_table,cpu)[(selname) >> 3], (u32)(address)); \ -set_limit(per_cpu(cpu_gdt_t...
2007 Apr 18
0
[PATCH 1/3] Gdt page isolation fix
...oscalls.c 2005-09-28 13:13:42.000000000 -0700 @@ -69,14 +69,14 @@ __asm__( #define Q_SET_SEL(cpu, selname, address, size) \ do { \ -set_base(per_cpu(cpu_gdt_table,cpu)[(selname) >> 3], __va((u32)(address))); \ -set_limit(per_cpu(cpu_gdt_table,cpu)[(selname) >> 3], size); \ +set_base(get_cpu_gdt_table(cpu)[(selname) >> 3], __va((u32)(address))); \ +set_limit(get_cpu_gdt_table(cpu)[(selname) >> 3], size); \ } while(0) #define Q2_SET_SEL(cpu, selname, address, size) \ do { \ -set_base(per_cpu(cpu_gdt_table,cpu)[(selname) >> 3], (u32)(address)); \ -set_limit(per_cpu(cpu_gdt_t...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:15:56.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:16:07.000000000 -0700 @@ -21,6 +21,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table, _cpu)) + DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); struct Xgt_desc_struct { @@ -68,7 +70,7 @@ static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) { - _set_tssldt_desc(&per_cpu(cpu_gdt_table, cpu...
2007 Apr 18
0
[PATCH 7/12] gdt-accessor
...-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:15:56.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:16:07.000000000 -0700 @@ -21,6 +21,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table, _cpu)) + DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); struct Xgt_desc_struct { @@ -68,7 +70,7 @@ static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) { - _set_tssldt_desc(&per_cpu(cpu_gdt_table, cpu...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
...-2.6.13.orig/include/asm-i386/desc.h 2005-08-09 20:17:21.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-10 20:41:03.000000000 -0700 @@ -39,6 +39,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table, _cpu)) + DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); struct Xgt_desc_struct { Index: linux-2.6.13/include/asm-i386/mach-default/mach_desc.h =================================================================== --- linux-2.6.13.orig/include/...
2007 Apr 18
2
[PATCH 8/14] i386 / Add a per cpu gdt accessor
...-2.6.13.orig/include/asm-i386/desc.h 2005-08-09 20:17:21.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-10 20:41:03.000000000 -0700 @@ -39,6 +39,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table, _cpu)) + DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); struct Xgt_desc_struct { Index: linux-2.6.13/include/asm-i386/mach-default/mach_desc.h =================================================================== --- linux-2.6.13.orig/include/...
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
...rc1.orig/include/asm-i386/desc.h 2005-09-20 14:49:10.000000000 -0700 +++ linux-2.6.14-rc1/include/asm-i386/desc.h 2005-09-20 18:49:07.000000000 -0700 @@ -17,6 +17,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table,_cpu)) + DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); struct Xgt_desc_struct { @@ -60,7 +62,7 @@ __asm__ __volatile__ ("movw %w3,0(%2)\n\ static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) { - _set_...
2007 Apr 18
1
[PATCH 2/3] Gdt_accessor
...rc1.orig/include/asm-i386/desc.h 2005-09-20 14:49:10.000000000 -0700 +++ linux-2.6.14-rc1/include/asm-i386/desc.h 2005-09-20 18:49:07.000000000 -0700 @@ -17,6 +17,8 @@ extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table,_cpu)) + DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); struct Xgt_desc_struct { @@ -60,7 +62,7 @@ __asm__ __volatile__ ("movw %w3,0(%2)\n\ static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) { - _set_...
2007 Apr 18
0
[PATCH 11/12] subarch-desc
...0 @@ "1" (limit)); \ } while(0) -#define set_base(desc,base) _set_base((desc), (base)) -#define set_limit(desc,limit) _set_limit((desc), ((limit)-1)>>12) - -static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) -{ - _set_tssldt_desc(&get_cpu_gdt_table(cpu)[entry], (int)addr, - offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89); -} +#include <mach_desc.h> #define set_tss_desc(cpu,addr) __set_tss_desc(cpu, GDT_ENTRY_TSS, addr) -static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size) -{ - _set_tssldt_des...
2007 Apr 18
0
[PATCH 11/12] subarch-desc
...0 @@ "1" (limit)); \ } while(0) -#define set_base(desc,base) _set_base((desc), (base)) -#define set_limit(desc,limit) _set_limit((desc), ((limit)-1)>>12) - -static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) -{ - _set_tssldt_desc(&get_cpu_gdt_table(cpu)[entry], (int)addr, - offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89); -} +#include <mach_desc.h> #define set_tss_desc(cpu,addr) __set_tss_desc(cpu, GDT_ENTRY_TSS, addr) -static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size) -{ - _set_tssldt_des...
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
...base1 = (base >> 16) & 0xff; + d->base2 = (base >> 24) & 0xff; + d->limit0 = limit & 0xffff; + d->type = type; + d->limit1 = 0; + d->flags = 0; +} static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) { - _set_tssldt_desc(&get_cpu_gdt_table(cpu)[entry], (int)addr, + set_tssldt_desc(&get_cpu_gdt_table(cpu)[entry], (int)addr, offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89); } @@ -70,7 +118,7 @@ static inline void __set_tss_desc(unsign static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size...
2007 Apr 18
3
[PATCH 12/21] i386 Deprecate descriptor asm
...base1 = (base >> 16) & 0xff; + d->base2 = (base >> 24) & 0xff; + d->limit0 = limit & 0xffff; + d->type = type; + d->limit1 = 0; + d->flags = 0; +} static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) { - _set_tssldt_desc(&get_cpu_gdt_table(cpu)[entry], (int)addr, + set_tssldt_desc(&get_cpu_gdt_table(cpu)[entry], (int)addr, offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89); } @@ -70,7 +118,7 @@ static inline void __set_tss_desc(unsign static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size...
2007 Dec 06
51
[PATCH 0/19] desc_struct integration
Hi, this is a series of patches that unify the struct desc_struct and friends across x86_64 and i386. As usual, it provides paravirt capabilities as a side-effect for x86_64. I consider the main goal, namely, of unifying the desc_struct, an ongoing effort, being this the beginning. A lot of old code has to be touched to accomplish that. I don't consider this patch ready for inclusion.
2007 Dec 06
51
[PATCH 0/19] desc_struct integration
Hi, this is a series of patches that unify the struct desc_struct and friends across x86_64 and i386. As usual, it provides paravirt capabilities as a side-effect for x86_64. I consider the main goal, namely, of unifying the desc_struct, an ongoing effort, being this the beginning. A lot of old code has to be touched to accomplish that. I don't consider this patch ready for inclusion.
2007 Apr 18
0
[PATCH 13/21] i386 Gdt page isolation
...5-11-04 17:45:31.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/desc.h 2005-11-05 00:28:06.000000000 -0800 @@ -15,9 +15,6 @@ #include <asm/mmu.h> extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; -DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); - -#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table,_cpu)) DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); @@ -29,6 +26,11 @@ struct Xgt_desc_struct { extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; +static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) +{...
2007 Apr 18
0
[PATCH 13/21] i386 Gdt page isolation
...5-11-04 17:45:31.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/desc.h 2005-11-05 00:28:06.000000000 -0800 @@ -15,9 +15,6 @@ #include <asm/mmu.h> extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; -DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); - -#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table,_cpu)) DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); @@ -29,6 +26,11 @@ struct Xgt_desc_struct { extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; +static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) +{...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...f) << 8) | ((flags & 0xf) << 12); +} -static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) +static inline void pack_gate(__u32 *a, __u32 *b, + unsigned long base, unsigned short seg, unsigned char type, unsigned char flags) { - _set_tssldt_desc(&get_cpu_gdt_table(cpu)[entry], (int)addr, - offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89); + *a = (seg << 16) | (base & 0xffff); + *b = (base & 0xffff0000) | ((type & 0xff) << 8) | (flags & 0xff); } -#define set_tss_desc(cpu,addr) __set_tss_desc(cpu, GDT_ENTRY_TSS, addr)...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...f) << 8) | ((flags & 0xf) << 12); +} -static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) +static inline void pack_gate(__u32 *a, __u32 *b, + unsigned long base, unsigned short seg, unsigned char type, unsigned char flags) { - _set_tssldt_desc(&get_cpu_gdt_table(cpu)[entry], (int)addr, - offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89); + *a = (seg << 16) | (base & 0xffff); + *b = (base & 0xffff0000) | ((type & 0xff) << 8) | (flags & 0xff); } -#define set_tss_desc(cpu,addr) __set_tss_desc(cpu, GDT_ENTRY_TSS, addr)...
2007 Apr 18
1
[PATCH 14/21] i386 Apm is on cpu zero only
...use a segmentation violation in the kernel at boot time. * Most BIOS's, however, will respect a 64k limit, so we use that. + * + * Note we only set APM segments on CPU zero, since we pin the APM + * code to that CPU. */ - for (i = 0; i < NR_CPUS; i++) { - struct desc_struct *gdt = get_cpu_gdt_table(i); - if (!gdt) - continue; - set_base(&gdt[APM_CS >> 3], - __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(&gdt[APM_CS_16 >> 3], - __va((unsigned long)apm_info.bios.cseg_16 << 4)); - set_base(&gdt[APM_DS >> 3], - __va((unsigned l...
2007 Apr 18
1
[PATCH 14/21] i386 Apm is on cpu zero only
...use a segmentation violation in the kernel at boot time. * Most BIOS's, however, will respect a 64k limit, so we use that. + * + * Note we only set APM segments on CPU zero, since we pin the APM + * code to that CPU. */ - for (i = 0; i < NR_CPUS; i++) { - struct desc_struct *gdt = get_cpu_gdt_table(i); - if (!gdt) - continue; - set_base(&gdt[APM_CS >> 3], - __va((unsigned long)apm_info.bios.cseg << 4)); - set_base(&gdt[APM_CS_16 >> 3], - __va((unsigned long)apm_info.bios.cseg_16 << 4)); - set_base(&gdt[APM_DS >> 3], - __va((unsigned l...