Displaying 20 results from an estimated 65 matches for "load_ldt".
2007 Apr 18
2
[PATCH 12/12; UPDATED] xen-ldt
...visor_hooks.h>
#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
static void flush_ldt(void *null)
@@ -58,16 +59,22 @@
#ifdef CONFIG_SMP
cpumask_t mask;
preempt_disable();
+ make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
load_LDT(pc);
mask = cpumask_of_cpu(smp_processor_id());
if (!cpus_equal(current->mm->cpu_vm_mask, mask))
smp_call_function(flush_ldt, NULL, 1, 1);
preempt_enable();
#else
+ make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
load_LDT(pc);
#endif...
2007 Apr 18
2
[PATCH 12/12; UPDATED] xen-ldt
...visor_hooks.h>
#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
static void flush_ldt(void *null)
@@ -58,16 +59,22 @@
#ifdef CONFIG_SMP
cpumask_t mask;
preempt_disable();
+ make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
load_LDT(pc);
mask = cpumask_of_cpu(smp_processor_id());
if (!cpus_equal(current->mm->cpu_vm_mask, mask))
smp_call_function(flush_ldt, NULL, 1, 1);
preempt_enable();
#else
+ make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
load_LDT(pc);
#endif...
2007 Apr 18
0
[PATCH 5/12] desc-cleanup
...17:10:49.000000000 -0700
+++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:15:46.000000000 -0700
@@ -31,18 +31,18 @@
extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS];
-#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))
+#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))
-#define load_gdt(dtr) __asm__...
2007 Apr 18
0
[PATCH 13/14] i386 / Introduce hypervisor ldt hooks
...;
+#include <mach_pgalloc.h>
#ifdef CONFIG_SMP /* avoids "defined but not used" warning */
static void flush_ldt(void *null)
@@ -59,16 +60,19 @@
#ifdef CONFIG_SMP
cpumask_t mask;
preempt_disable();
+ SetPagesLDT(pc->ldt, (pc->size * LDT_ENTRY_SIZE) / PAGE_SIZE);
load_LDT(pc);
mask = cpumask_of_cpu(smp_processor_id());
if (!cpus_equal(current->mm->cpu_vm_mask, mask))
smp_call_function(flush_ldt, NULL, 1, 1);
preempt_enable();
#else
+ SetPagesLDT(pc->ldt, (pc->size * LDT_ENTRY_SIZE) / PAGE_SIZE);
load_LDT(pc);
#endif
}
if (oldsize)...
2007 Apr 18
0
[PATCH 5/12] desc-cleanup
...17:10:49.000000000 -0700
+++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:15:46.000000000 -0700
@@ -31,18 +31,18 @@
extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS];
-#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))
+#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))
-#define load_gdt(dtr) __asm__...
2007 Apr 18
0
[PATCH 13/14] i386 / Introduce hypervisor ldt hooks
...;
+#include <mach_pgalloc.h>
#ifdef CONFIG_SMP /* avoids "defined but not used" warning */
static void flush_ldt(void *null)
@@ -59,16 +60,19 @@
#ifdef CONFIG_SMP
cpumask_t mask;
preempt_disable();
+ SetPagesLDT(pc->ldt, (pc->size * LDT_ENTRY_SIZE) / PAGE_SIZE);
load_LDT(pc);
mask = cpumask_of_cpu(smp_processor_id());
if (!cpus_equal(current->mm->cpu_vm_mask, mask))
smp_call_function(flush_ldt, NULL, 1, 1);
preempt_enable();
#else
+ SetPagesLDT(pc->ldt, (pc->size * LDT_ENTRY_SIZE) / PAGE_SIZE);
load_LDT(pc);
#endif
}
if (oldsize)...
2007 Apr 18
1
[PATCH 4/14] i386 / Clean up asm and volatile keywords in desc
...-09 18:38:14.000000000 -0700
+++ linux-2.6.13/include/asm-i386/mach-default/mach_desc.h 2005-08-10 20:42:03.000000000 -0700
@@ -24,30 +24,30 @@
#ifndef __MACH_DESC_H
#define __MACH_DESC_H
-#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))
+#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))
-#define load_gdt(dtr) __asm__...
2007 Apr 18
1
[PATCH 4/14] i386 / Clean up asm and volatile keywords in desc
...-09 18:38:14.000000000 -0700
+++ linux-2.6.13/include/asm-i386/mach-default/mach_desc.h 2005-08-10 20:42:03.000000000 -0700
@@ -24,30 +24,30 @@
#ifndef __MACH_DESC_H
#define __MACH_DESC_H
-#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))
+#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))
-#define load_gdt(dtr) __asm__...
2007 Apr 18
0
[PATCH 12/12] xen-ldt
...visor_hooks.h>
#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
static void flush_ldt(void *null)
@@ -58,16 +59,22 @@
#ifdef CONFIG_SMP
cpumask_t mask;
preempt_disable();
+ make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
load_LDT(pc);
mask = cpumask_of_cpu(smp_processor_id());
if (!cpus_equal(current->mm->cpu_vm_mask, mask))
smp_call_function(flush_ldt, NULL, 1, 1);
preempt_enable();
#else
+ make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
load_LDT(pc);
#endif...
2007 Apr 18
0
[PATCH 12/12] xen-ldt
...visor_hooks.h>
#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
static void flush_ldt(void *null)
@@ -58,16 +59,22 @@
#ifdef CONFIG_SMP
cpumask_t mask;
preempt_disable();
+ make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
load_LDT(pc);
mask = cpumask_of_cpu(smp_processor_id());
if (!cpus_equal(current->mm->cpu_vm_mask, mask))
smp_call_function(flush_ldt, NULL, 1, 1);
preempt_enable();
#else
+ make_pages_readonly(pc->ldt, (pc->size * LDT_ENTRY_SIZE) /
+ PAGE_SIZE);
load_LDT(pc);
#endif...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...clude/asm-i386/desc.h 2006-03-10 13:03:34.000000000 -0800
@@ -33,50 +33,66 @@ static inline struct desc_struct *get_cp
return (struct desc_struct *)per_cpu(cpu_gdt_descr, cpu).address;
}
-#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))
-
-#define load_gdt(dtr) __asm__ __volatile("lgdt %0"::"m" (*dtr))
-#define load_idt(dtr) __asm__ __volatile("lidt %0"::"m" (*dtr))
-#define load_tr(tr) __asm__ __volatile(&quo...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
...clude/asm-i386/desc.h 2006-03-10 13:03:34.000000000 -0800
@@ -33,50 +33,66 @@ static inline struct desc_struct *get_cp
return (struct desc_struct *)per_cpu(cpu_gdt_descr, cpu).address;
}
-#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))
-
-#define load_gdt(dtr) __asm__ __volatile("lgdt %0"::"m" (*dtr))
-#define load_idt(dtr) __asm__ __volatile("lidt %0"::"m" (*dtr))
-#define load_tr(tr) __asm__ __volatile(&quo...
2007 Apr 18
0
[PATCH 11/12] subarch-desc
...05-08-08 17:31:59.000000000 -0700
+++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:36:35.000000000 -0700
@@ -33,19 +33,6 @@
extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS];
-#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))
-
-#define load_gdt(dtr) asm volatile("lgdtl %0"::"m" (*dtr))
-#define load_idt(dtr) asm volatile("lidtl %0"::"m" (*dtr))
-#define load_tr(tr) asm volatile("ltr %0"::"mr...
2007 Apr 18
0
[PATCH 11/12] subarch-desc
...05-08-08 17:31:59.000000000 -0700
+++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:36:35.000000000 -0700
@@ -33,19 +33,6 @@
extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS];
-#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))
-
-#define load_gdt(dtr) asm volatile("lgdtl %0"::"m" (*dtr))
-#define load_idt(dtr) asm volatile("lidtl %0"::"m" (*dtr))
-#define load_tr(tr) asm volatile("ltr %0"::"mr...
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 1/12] gdt-tss-redundant
...set_tss_desc(cpu,t); /* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */
- per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TSS].b &= 0xfffffdff;
load_TR_desc(); /* This does ltr */
load_LDT(¤t->active_mm->context); /* This does lldt */
2007 Apr 18
0
[PATCH 1/12] gdt-tss-redundant
...set_tss_desc(cpu,t); /* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */
- per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TSS].b &= 0xfffffdff;
load_TR_desc(); /* This does ltr */
load_LDT(¤t->active_mm->context); /* This does lldt */
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 07/17] paravirt_ops - descriptor changes.
...=================================
--- clean-start.orig/include/asm-x86_64/desc.h
+++ clean-start/include/asm-x86_64/desc.h
@@ -16,9 +16,8 @@
extern struct desc_struct cpu_gdt_table[GDT_ENTRIES];
-#define load_TR_desc() asm volatile("ltr %w0"::"r" (GDT_ENTRY_TSS*8))
-#define load_LDT_desc() asm volatile("lldt %w0"::"r" (GDT_ENTRY_LDT*8))
-#define clear_LDT() asm volatile("lldt %w0"::"r" (0))
+/* the cpu gdt accessor */
+#define cpu_gdt(_cpu) ((struct desc_struct *)cpu_gdt_descr[_cpu].address)
/*
* This is the ldt that every process...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 07/17] paravirt_ops - descriptor changes.
...=================================
--- clean-start.orig/include/asm-x86_64/desc.h
+++ clean-start/include/asm-x86_64/desc.h
@@ -16,9 +16,8 @@
extern struct desc_struct cpu_gdt_table[GDT_ENTRIES];
-#define load_TR_desc() asm volatile("ltr %w0"::"r" (GDT_ENTRY_TSS*8))
-#define load_LDT_desc() asm volatile("lldt %w0"::"r" (GDT_ENTRY_LDT*8))
-#define clear_LDT() asm volatile("lldt %w0"::"r" (0))
+/* the cpu gdt accessor */
+#define cpu_gdt(_cpu) ((struct desc_struct *)cpu_gdt_descr[_cpu].address)
/*
* This is the ldt that every process...