search for: oldldt

Displaying 12 results from an estimated 12 matches for "oldldt".

2007 Apr 18
2
[PATCH 3/6] i386 virtualization - Make ldt a desc struct
....000000000 -0700 > @@ -28,28 +28,27 @@ > } > #endif > > -static inline int alloc_ldt(mm_context_t *pc, const int oldsize, int mincount, const int reload) > +static inline int alloc_ldt(mm_context_t *pc, const int old_pages, int new_pages, const int reload) > { > - void *oldldt; > - void *newldt; > + struct desc_struct *oldldt; > + struct desc_struct *newldt; > Not quite related here (since change was introduced in earlier patch), but old alloc_ldt special cased when room was available. This is gone, so am I reading this correctly, each time through it wil...
2007 Apr 18
2
[PATCH 3/6] i386 virtualization - Make ldt a desc struct
....000000000 -0700 > @@ -28,28 +28,27 @@ > } > #endif > > -static inline int alloc_ldt(mm_context_t *pc, const int oldsize, int mincount, const int reload) > +static inline int alloc_ldt(mm_context_t *pc, const int old_pages, int new_pages, const int reload) > { > - void *oldldt; > - void *newldt; > + struct desc_struct *oldldt; > + struct desc_struct *newldt; > Not quite related here (since change was introduced in earlier patch), but old alloc_ldt special cased when room was available. This is gone, so am I reading this correctly, each time through it wil...
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
...flush_ldt(void *null) { if (current->active_mm) @@ -27,33 +27,33 @@ static void flush_ldt(void *null) } #endif -static int alloc_ldt(mm_context_t *pc, int mincount, int reload) +static inline int alloc_ldt(mm_context_t *pc, const int old_pages, int new_pages, const int reload) { - void *oldldt; - void *newldt; - int oldsize; + struct desc_struct *oldldt; + struct desc_struct *newldt; - if (mincount <= pc->size) - return 0; - oldsize = pc->size; - mincount = (mincount+511)&(~511); - if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE) - newldt = vmalloc(mincount*LDT_ENTRY_SIZE); +...
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
...flush_ldt(void *null) { if (current->active_mm) @@ -27,33 +27,33 @@ static void flush_ldt(void *null) } #endif -static int alloc_ldt(mm_context_t *pc, int mincount, int reload) +static inline int alloc_ldt(mm_context_t *pc, const int old_pages, int new_pages, const int reload) { - void *oldldt; - void *newldt; - int oldsize; + struct desc_struct *oldldt; + struct desc_struct *newldt; - if (mincount <= pc->size) - return 0; - oldsize = pc->size; - mincount = (mincount+511)&(~511); - if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE) - newldt = vmalloc(mincount*LDT_ENTRY_SIZE); +...
2007 Apr 18
0
[PATCH 13/14] i386 / Introduce hypervisor ldt hooks
...mask_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) { + ClearPagesLDT(oldldt, (oldsize * LDT_ENTRY_SIZE) / PAGE_SIZE); if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE) vfree(oldldt); else @@ -83,8 +87,10 @@ down(&old->sem); err = alloc_ldt(new, 0, old->size, 0); - if (!err) + if (!err) { memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE); +...
2007 Apr 18
0
[PATCH 13/14] i386 / Introduce hypervisor ldt hooks
...mask_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) { + ClearPagesLDT(oldldt, (oldsize * LDT_ENTRY_SIZE) / PAGE_SIZE); if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE) vfree(oldldt); else @@ -83,8 +87,10 @@ down(&old->sem); err = alloc_ldt(new, 0, old->size, 0); - if (!err) + if (!err) { memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE); +...
2007 Apr 18
0
[PATCH 12/12] xen-ldt
...r_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 } if (oldsize) { + make_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) / + PAGE_SIZE); if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE) vfree(oldldt); else @@ -82,6 +89,8 @@ if (err < 0) return err; memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE); + make_pages_readonly(new->ldt, (new->size * LDT_ENTR...
2007 Apr 18
0
[PATCH 12/12] xen-ldt
...r_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 } if (oldsize) { + make_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) / + PAGE_SIZE); if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE) vfree(oldldt); else @@ -82,6 +89,8 @@ if (err < 0) return err; memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE); + make_pages_readonly(new->ldt, (new->size * LDT_ENTR...
2007 Apr 18
2
[PATCH 12/12; UPDATED] xen-ldt
...r_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 } if (oldsize) { + make_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) / + PAGE_SIZE); if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE) vfree(oldldt); else @@ -82,6 +89,8 @@ if (err < 0) return err; memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE); + make_pages_readonly(new->ldt, (new->size * LDT_ENTR...
2007 Apr 18
2
[PATCH 12/12; UPDATED] xen-ldt
...r_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 } if (oldsize) { + make_pages_writable(oldldt, (oldsize * LDT_ENTRY_SIZE) / + PAGE_SIZE); if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE) vfree(oldldt); else @@ -82,6 +89,8 @@ if (err < 0) return err; memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE); + make_pages_readonly(new->ldt, (new->size * LDT_ENTR...
2007 Apr 18
0
[PATCH 12/14] i386 / Move context switch inline
...ot used" warning */ static void flush_ldt(void *null) { if (current->active_mm) @@ -27,15 +27,11 @@ } #endif -static int alloc_ldt(mm_context_t *pc, int mincount, int reload) +static inline int alloc_ldt(mm_context_t *pc, const int oldsize, int mincount, const int reload) { void *oldldt; void *newldt; - int oldsize; - if (mincount <= pc->size) - return 0; - oldsize = pc->size; mincount = (mincount+511)&(~511); if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE) newldt = vmalloc(mincount*LDT_ENTRY_SIZE); @@ -48,12 +44,17 @@ if (oldsize) memcpy(newldt, pc->l...
2007 Apr 18
0
[PATCH 12/14] i386 / Move context switch inline
...ot used" warning */ static void flush_ldt(void *null) { if (current->active_mm) @@ -27,15 +27,11 @@ } #endif -static int alloc_ldt(mm_context_t *pc, int mincount, int reload) +static inline int alloc_ldt(mm_context_t *pc, const int oldsize, int mincount, const int reload) { void *oldldt; void *newldt; - int oldsize; - if (mincount <= pc->size) - return 0; - oldsize = pc->size; mincount = (mincount+511)&(~511); if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE) newldt = vmalloc(mincount*LDT_ENTRY_SIZE); @@ -48,12 +44,17 @@ if (oldsize) memcpy(newldt, pc->l...