search for: write_ldt_entry

Displaying 20 results from an estimated 112 matches for "write_ldt_entry".

2007 Apr 18
2
[PATCH 1/14] i386 / Make write ldt return error code
...lt/mach_desc.h 2005-08-09 18:19:39.000000000 -0700 +++ linux-2.6.13/include/asm-i386/mach-default/mach_desc.h 2005-08-09 18:24:10.000000000 -0700 @@ -62,11 +62,12 @@ _set_tssldt_desc(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82); } -static inline void write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 entry_b) +static inline int write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 entry_b) { __u32 *lp = (__u32 *)((char *)ldt + entry*8); *lp = entry_a; *(lp+1) = entry_b; + return 0; } #if TLS_SIZE != 24 Index: linux-2.6.13/arch/i386/kern...
2007 Apr 18
2
[PATCH 1/14] i386 / Make write ldt return error code
...lt/mach_desc.h 2005-08-09 18:19:39.000000000 -0700 +++ linux-2.6.13/include/asm-i386/mach-default/mach_desc.h 2005-08-09 18:24:10.000000000 -0700 @@ -62,11 +62,12 @@ _set_tssldt_desc(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82); } -static inline void write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 entry_b) +static inline int write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 entry_b) { __u32 *lp = (__u32 *)((char *)ldt + entry*8); *lp = entry_a; *(lp+1) = entry_b; + return 0; } #if TLS_SIZE != 24 Index: linux-2.6.13/arch/i386/kern...
2007 Apr 18
2
[PATCH 12/12; UPDATED] xen-ldt
Add Xen accessors for LDT updates. Todo: Bring back return values from write_ldt_entry. Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.13/arch/i386/kernel/ldt.c =================================================================== --- linux-2.6.13.orig/arch/i386/kernel/ldt.c 2005-08-08 21:13:56.000000000 -0700 +++ linux-2.6.13/arch/i386/kernel/ldt.c 2005-08-08...
2007 Apr 18
2
[PATCH 12/12; UPDATED] xen-ldt
Add Xen accessors for LDT updates. Todo: Bring back return values from write_ldt_entry. Signed-off-by: Zachary Amsden <zach@vmware.com> Index: linux-2.6.13/arch/i386/kernel/ldt.c =================================================================== --- linux-2.6.13.orig/arch/i386/kernel/ldt.c 2005-08-08 21:13:56.000000000 -0700 +++ linux-2.6.13/arch/i386/kernel/ldt.c 2005-08-08...
2007 Apr 18
1
[PATCH 2/12] ldt-accessors
...char *) mm->context.ldt); - /* Allow LDTs to be cleared by the user. */ if (ldt_info.base_addr == 0 && ldt_info.limit == 0) { if (oldmode || LDT_empty(&ldt_info)) { @@ -223,8 +221,7 @@ /* Install the new entry ... */ install: - *lp = entry_1; - *(lp+1) = entry_2; + write_ldt_entry(mm->context.ldt, ldt_info.entry_number, entry_1, entry_2); error = 0; out_unlock: Index: linux-2.6.13/arch/i386/kernel/kprobes.c =================================================================== --- linux-2.6.13.orig/arch/i386/kernel/kprobes.c 2005-08-08 13:50:12.000000000 -0700 +++ linux...
2007 Apr 18
1
[PATCH 2/12] ldt-accessors
...char *) mm->context.ldt); - /* Allow LDTs to be cleared by the user. */ if (ldt_info.base_addr == 0 && ldt_info.limit == 0) { if (oldmode || LDT_empty(&ldt_info)) { @@ -223,8 +221,7 @@ /* Install the new entry ... */ install: - *lp = entry_1; - *(lp+1) = entry_2; + write_ldt_entry(mm->context.ldt, ldt_info.entry_number, entry_1, entry_2); error = 0; out_unlock: Index: linux-2.6.13/arch/i386/kernel/kprobes.c =================================================================== --- linux-2.6.13.orig/arch/i386/kernel/kprobes.c 2005-08-08 13:50:12.000000000 -0700 +++ linux...
2007 Dec 06
51
[PATCH 0/19] desc_struct integration
...l, 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. Basically, the main reason is that I change the signatures of write_idt_entry(), write_gdt_entry(), and write_ldt_entry(). This is needed to account for the differences between the two architectures. (For example, gate descriptors in x86_64 are 16-byte long and can't be represented by low and high entries). As my patch series were 64-bit only, I hadn't come across the problem before. I think this interface...
2007 Dec 06
51
[PATCH 0/19] desc_struct integration
...l, 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. Basically, the main reason is that I change the signatures of write_idt_entry(), write_gdt_entry(), and write_ldt_entry(). This is needed to account for the differences between the two architectures. (For example, gate descriptors in x86_64 are 16-byte long and can't be represented by low and high entries). As my patch series were 64-bit only, I hadn't come across the problem before. I think this interface...
2007 Apr 18
0
[PATCH 11/12] subarch-desc
...NTRY_LDT], (int)addr, ((size << 3)-1), 0x82); -} - #define LDT_entry_a(info) \ ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff)) @@ -140,17 +115,6 @@ (info)->seg_not_present == 1 && \ (info)->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...
2007 Apr 18
0
[PATCH 11/12] subarch-desc
...NTRY_LDT], (int)addr, ((size << 3)-1), 0x82); -} - #define LDT_entry_a(info) \ ((((info)->base_addr & 0x0000ffff) << 16) | ((info)->limit & 0x0ffff)) @@ -140,17 +115,6 @@ (info)->seg_not_present == 1 && \ (info)->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...
2007 Apr 18
3
Proposed interface change
I would like to propose an interface change to the following paravirt-ops calls: void (fastcall *write_ldt_entry)(void *dt, int entrynum, u64 entry); void (fastcall *write_gdt_entry)(void *dt, int entrynum, u64 entry); void (fastcall *write_idt_entry)(void *dt, int entrynum, u64 entry); Can we consolidate the dt and entrynum parameters and just pass dt+entrynum*8? I don't know if this...
2007 Jul 09
1
[PATCH RFC] first cut at splitting up paravirt_ops
...et_cpu_khz = native_calculate_cpu_khz, - .load_tr_desc = native_load_tr_desc, - .set_ldt = native_set_ldt, - .load_gdt = native_load_gdt, - .load_idt = native_load_idt, - .store_gdt = native_store_gdt, - .store_idt = native_store_idt, - .store_tr = native_store_tr, - .load_tls = native_load_tls, - .write_ldt_entry = write_dt_entry, - .write_gdt_entry = write_dt_entry, - .write_idt_entry = write_dt_entry, - .load_esp0 = native_load_esp0, - - .set_iopl_mask = native_set_iopl_mask, - .io_delay = native_io_delay, - +static struct paravirt_ops paravirt_ops = { + .pv_info = { + .name = "bare hardware",...
2007 Jul 09
1
[PATCH RFC] first cut at splitting up paravirt_ops
...et_cpu_khz = native_calculate_cpu_khz, - .load_tr_desc = native_load_tr_desc, - .set_ldt = native_set_ldt, - .load_gdt = native_load_gdt, - .load_idt = native_load_idt, - .store_gdt = native_store_gdt, - .store_idt = native_store_idt, - .store_tr = native_store_tr, - .load_tls = native_load_tls, - .write_ldt_entry = write_dt_entry, - .write_gdt_entry = write_dt_entry, - .write_idt_entry = write_dt_entry, - .load_esp0 = native_load_esp0, - - .set_iopl_mask = native_set_iopl_mask, - .io_delay = native_io_delay, - +static struct paravirt_ops paravirt_ops = { + .pv_info = { + .name = "bare hardware",...
2007 Apr 18
5
[PATCH] paravirt.h
...lt;asm/paravirt.h> +#else #define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) #define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) @@ -98,6 +101,7 @@ static inline void write_dt_entry(void * #define write_ldt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b) #define write_gdt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b) #define write_idt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b) +#endif /* CONFIG_PARAVIRT */ static inline void _set_gate(int gate, unsigned int type, void *addr,...
2007 Apr 18
5
[PATCH] paravirt.h
...lt;asm/paravirt.h> +#else #define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) #define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) @@ -98,6 +101,7 @@ static inline void write_dt_entry(void * #define write_ldt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b) #define write_gdt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b) #define write_idt_entry(dt, entry, a, b) write_dt_entry(dt, entry, a, b) +#endif /* CONFIG_PARAVIRT */ static inline void _set_gate(int gate, unsigned int type, void *addr,...
2007 Oct 09
2
[PATCH RFC REPOST 1/2] paravirt: refactor struct paravirt_ops into smaller pv_*_ops
...et_cpu_khz = native_calculate_cpu_khz, - .load_tr_desc = native_load_tr_desc, - .set_ldt = native_set_ldt, - .load_gdt = native_load_gdt, - .load_idt = native_load_idt, - .store_gdt = native_store_gdt, - .store_idt = native_store_idt, - .store_tr = native_store_tr, - .load_tls = native_load_tls, - .write_ldt_entry = write_dt_entry, - .write_gdt_entry = write_dt_entry, - .write_idt_entry = write_dt_entry, - .load_esp0 = native_load_esp0, - - .set_iopl_mask = native_set_iopl_mask, - .io_delay = native_io_delay, - + .pv_info = { + .name = "bare hardware", + .paravirt_enabled = 0, + .kernel_rpl = 0,...
2007 Oct 09
2
[PATCH RFC REPOST 1/2] paravirt: refactor struct paravirt_ops into smaller pv_*_ops
...et_cpu_khz = native_calculate_cpu_khz, - .load_tr_desc = native_load_tr_desc, - .set_ldt = native_set_ldt, - .load_gdt = native_load_gdt, - .load_idt = native_load_idt, - .store_gdt = native_store_gdt, - .store_idt = native_store_idt, - .store_tr = native_store_tr, - .load_tls = native_load_tls, - .write_ldt_entry = write_dt_entry, - .write_gdt_entry = write_dt_entry, - .write_idt_entry = write_dt_entry, - .load_esp0 = native_load_esp0, - - .set_iopl_mask = native_set_iopl_mask, - .io_delay = native_io_delay, - + .pv_info = { + .name = "bare hardware", + .paravirt_enabled = 0, + .kernel_rpl = 0,...
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
...E; + down(&pc->sem); + if (page_number >= pc->ldt_pages) { + error = alloc_ldt(pc, pc->ldt_pages, + page_number+1, 1); if (error < 0) goto out_unlock; } @@ -221,11 +229,11 @@ static int write_ldt(void __user * ptr, /* Install the new entry ... */ install: - write_ldt_entry(mm->context.ldt, ldt_info.entry_number, entry_1, entry_2); + write_ldt_entry(pc->ldt, ldt_info.entry_number, entry_1, entry_2); error = 0; out_unlock: - up(&mm->context.sem); + up(&pc->sem); out: return error; } Index: linux-2.6.14-zach-work/include/asm-i386/desc.h ====...
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
...E; + down(&pc->sem); + if (page_number >= pc->ldt_pages) { + error = alloc_ldt(pc, pc->ldt_pages, + page_number+1, 1); if (error < 0) goto out_unlock; } @@ -221,11 +229,11 @@ static int write_ldt(void __user * ptr, /* Install the new entry ... */ install: - write_ldt_entry(mm->context.ldt, ldt_info.entry_number, entry_1, entry_2); + write_ldt_entry(pc->ldt, ldt_info.entry_number, entry_1, entry_2); error = 0; out_unlock: - up(&mm->context.sem); + up(&pc->sem); out: return error; } Index: linux-2.6.14-zach-work/include/asm-i386/desc.h ====...
2007 Sep 28
2
[PATCH RFC] paravirt_ops: refactor struct paravirt_ops into smaller pv_*_ops
...et_cpu_khz = native_calculate_cpu_khz, - .load_tr_desc = native_load_tr_desc, - .set_ldt = native_set_ldt, - .load_gdt = native_load_gdt, - .load_idt = native_load_idt, - .store_gdt = native_store_gdt, - .store_idt = native_store_idt, - .store_tr = native_store_tr, - .load_tls = native_load_tls, - .write_ldt_entry = write_dt_entry, - .write_gdt_entry = write_dt_entry, - .write_idt_entry = write_dt_entry, - .load_esp0 = native_load_esp0, - - .set_iopl_mask = native_set_iopl_mask, - .io_delay = native_io_delay, - + .pv_info = { + .name = "bare hardware", + .paravirt_enabled = 0, + .kernel_rpl = 0,...