search for: alloc_ldt

Displaying 20 results from an estimated 23 matches for "alloc_ldt".

2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
....h> -#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */ +#ifdef CONFIG_SMP /* avoids "defined but not used" warning */ static void 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) - retur...
2007 Apr 18
0
[PATCH 20/21] i386 Ldt cleanups 3
....h> -#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */ +#ifdef CONFIG_SMP /* avoids "defined but not used" warning */ static void 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) - retur...
2007 Apr 18
0
[PATCH 12/14] i386 / Move context switch inline
...context and destroy_context inline into mmu_context.h, we can avoid extra functions calls, which are only needed for the unlikely case that the process context has an LDT to deal with. Now the code in ldt.c is called only when actually dealing with LDT creation or destruction. Careful analysis of alloc_ldt function showed that by using two const parameters, huge amounts of dead code would be eliminated, allowing it to inline into copy_ldt. This results in just better assembly code everywhere, and saves 118 bytes of space in my compilation - even with a lesser gcc (3.2.2). Less importantly, it puts...
2007 Apr 18
0
[PATCH 12/14] i386 / Move context switch inline
...context and destroy_context inline into mmu_context.h, we can avoid extra functions calls, which are only needed for the unlikely case that the process context has an LDT to deal with. Now the code in ldt.c is called only when actually dealing with LDT creation or destruction. Careful analysis of alloc_ldt function showed that by using two const parameters, huge amounts of dead code would be eliminated, allowing it to inline into copy_ldt. This results in just better assembly code everywhere, and saves 118 bytes of space in my compilation - even with a lesser gcc (3.2.2). Less importantly, it puts...
2007 Apr 18
2
[PATCH 3/6] i386 virtualization - Make ldt a desc struct
...======================================================= > --- linux-2.6.13.orig/arch/i386/kernel/ldt.c 2005-08-15 11:16:59.000000000 -0700 > +++ linux-2.6.13/arch/i386/kernel/ldt.c 2005-08-15 11:19:49.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; >...
2007 Apr 18
2
[PATCH 3/6] i386 virtualization - Make ldt a desc struct
...======================================================= > --- linux-2.6.13.orig/arch/i386/kernel/ldt.c 2005-08-15 11:16:59.000000000 -0700 > +++ linux-2.6.13/arch/i386/kernel/ldt.c 2005-08-15 11:19:49.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; >...
2007 Apr 18
0
[PATCH 13/14] i386 / Introduce hypervisor ldt hooks
...DT(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); + SetPagesLDT(new->ldt, (new->size * LDT_ENTRY_SIZE) / PAGE_SIZE); + } up(&old->sem); return err; } @@ -93,6 +99,7 @@ { if (mm == current->active_mm) cle...
2007 Apr 18
0
[PATCH 13/14] i386 / Introduce hypervisor ldt hooks
...DT(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); + SetPagesLDT(new->ldt, (new->size * LDT_ENTRY_SIZE) / PAGE_SIZE); + } up(&old->sem); return err; } @@ -93,6 +99,7 @@ { if (mm == current->active_mm) cle...
2006 May 12
0
kernel crash
...e snd soundcore sis900 floppy ext3 jbd May 12 15:34:18 ioana.slack.i kernel: CPU: 0 May 12 15:34:18 ioana.slack.i kernel: EIP: 0060:[<c010c0fc>] Not tainted VLI May 12 15:34:18 ioana.slack.i kernel: EFLAGS: 00010212 (2.6.9-34.EL) May 12 15:34:18 ioana.slack.i kernel: EIP is at alloc_ldt+0x5c/0xd5 May 12 15:34:18 ioana.slack.i kernel: eax: 03c00000 ebx: 00000000 ecx: c4673000 edx: 00000016 May 12 15:34:18 ioana.slack.i kernel: esi: 00780000 edi: 00000010 ebp: cd0e7574 esp: cabc9e64 May 12 15:34:18 ioana.slack.i kernel: ds: 007b es: 007b ss: 0068 May 12 15:34:18...
2017 Sep 01
0
[RFC PATCH v2 1/7] x86/paravirt: Add pv_idle_ops to paravirt ops
...ravirt_read_pmc(int counter) >> >> #define rdpmcl(counter, val) ((val) = paravirt_read_pmc(counter)) >> >> +static inline void paravirt_idle_poll(void) >> +{ >> + PVOP_VCALL0(pv_idle_ops.poll); >> +} >> + >> static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries) >> { >> PVOP_VCALL2(pv_cpu_ops.alloc_ldt, ldt, entries); >> diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h >> index 9ffc36b..cf45726 100644 >> --- a/arch/x86/include/asm/paravir...
2017 Sep 01
0
[RFC PATCH v2 1/7] x86/paravirt: Add pv_idle_ops to paravirt ops
...ravirt_read_pmc(int counter) >> >> #define rdpmcl(counter, val) ((val) = paravirt_read_pmc(counter)) >> >> +static inline void paravirt_idle_poll(void) >> +{ >> + PVOP_VCALL0(pv_idle_ops.poll); >> +} >> + >> static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries) >> { >> PVOP_VCALL2(pv_cpu_ops.alloc_ldt, ldt, entries); >> diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h >> index 9ffc36b..cf45726 100644 >> --- a/arch/x86/include/asm/paravir...
2015 Jun 17
0
[PATCH v3 03/18] x86/tsc/paravirt: Remove the read_tsc and read_tscp paravirt hooks
..._val >> 32); \ > - (aux) = __aux; \ > -} while (0) > - > -#define rdtscpll(val, aux) \ > -do { \ > - unsigned long __aux; \ > - val = paravirt_rdtscp(&__aux); \ > - (aux) = __aux; \ > -} while (0) > - > static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries) > { > PVOP_VCALL2(pv_cpu_ops.alloc_ldt, ldt, entries); > diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h > index a6b8f9fadb06..ce029e4fa7c6 100644 > --- a/arch/x86/include/asm/paravirt_types.h &g...
2015 Jun 17
0
[PATCH v3 03/18] x86/tsc/paravirt: Remove the read_tsc and read_tscp paravirt hooks
..._val >> 32); \ > - (aux) = __aux; \ > -} while (0) > - > -#define rdtscpll(val, aux) \ > -do { \ > - unsigned long __aux; \ > - val = paravirt_rdtscp(&__aux); \ > - (aux) = __aux; \ > -} while (0) > - > static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries) > { > PVOP_VCALL2(pv_cpu_ops.alloc_ldt, ldt, entries); > diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h > index a6b8f9fadb06..ce029e4fa7c6 100644 > --- a/arch/x86/include/asm/paravirt_types.h &g...
2017 Nov 13
2
[PATCH RFC v3 1/6] x86/paravirt: Add pv_idle_ops to paravirt ops
...h/x86/include/asm/paravirt.h @@ -198,6 +198,11 @@ static inline unsigned long long paravirt_read_pmc(int counter) #define rdpmcl(counter, val) ((val) = paravirt_read_pmc(counter)) +static inline void paravirt_idle_poll(void) +{ + PVOP_VCALL0(pv_idle_ops.poll); +} + static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries) { PVOP_VCALL2(pv_cpu_ops.alloc_ldt, ldt, entries); diff --git a/arch/x86/include/asm/paravirt_types.h b/arch/x86/include/asm/paravirt_types.h index 10cc3b9..95c0e3e 100644 --- a/arch/x86/include/asm/paravirt_types.h +++ b/arch/x86/include/asm/paravirt_t...
2018 Aug 10
0
[PATCH 04/10] x86/paravirt: use a single ops structure
...oad_idt = native_load_idt, - .store_tr = native_store_tr, - .load_tls = native_load_tls, -#ifdef CONFIG_X86_64 - .load_gs_index = native_load_gs_index, -#endif - .write_ldt_entry = native_write_ldt_entry, - .write_gdt_entry = native_write_gdt_entry, - .write_idt_entry = native_write_idt_entry, - - .alloc_ldt = paravirt_nop, - .free_ldt = paravirt_nop, - - .load_sp0 = native_load_sp0, - -#ifdef CONFIG_X86_64 - .usergs_sysret64 = native_usergs_sysret64, -#endif - .iret = native_iret, - .swapgs = native_swapgs, - - .set_iopl_mask = native_set_iopl_mask, - .io_delay = native_io_delay, - - .start_context_sw...
2017 Sep 04
0
[PATCH] x86/paravirt: remove no longer used paravirt functions
...+1056,6 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = { .read_cr0 = xen_read_cr0, .write_cr0 = xen_write_cr0, - .read_cr4 = native_read_cr4, .write_cr4 = xen_write_cr4, #ifdef CONFIG_X86_64 @@ -1091,7 +1090,6 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = { .alloc_ldt = xen_alloc_ldt, .free_ldt = xen_free_ldt, - .store_idt = native_store_idt, .store_tr = xen_store_tr, .write_ldt_entry = xen_write_ldt_entry, diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index cab28cf2cffb..5f61b7e2e6b2 100644 --- a/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/m...
2017 Sep 04
0
[PATCH] x86/paravirt: remove no longer used paravirt functions
...+1056,6 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = { .read_cr0 = xen_read_cr0, .write_cr0 = xen_write_cr0, - .read_cr4 = native_read_cr4, .write_cr4 = xen_write_cr4, #ifdef CONFIG_X86_64 @@ -1091,7 +1090,6 @@ static const struct pv_cpu_ops xen_cpu_ops __initconst = { .alloc_ldt = xen_alloc_ldt, .free_ldt = xen_free_ldt, - .store_idt = native_store_idt, .store_tr = xen_store_tr, .write_ldt_entry = xen_write_ldt_entry, diff --git a/arch/x86/xen/mmu_pv.c b/arch/x86/xen/mmu_pv.c index cab28cf2cffb..5f61b7e2e6b2 100644 --- a/arch/x86/xen/mmu_pv.c +++ b/arch/x86/xen/m...
2017 May 19
13
[PATCH 00/10] paravirt: make amount of paravirtualization configurable
Today paravirtualization is a all-or-nothing game: either a kernel is compiled with no paravirtualization support at all, or it is supporting paravirtualized environments like Xen pv-guests or lguest additionally to some paravirtualized tuning for KVM, Hyperv, VMWare or Xen HVM-guests. As support of pv-guests requires quite intrusive pv-hooks (e.g. all access functions to page table entries,
2017 May 19
13
[PATCH 00/10] paravirt: make amount of paravirtualization configurable
Today paravirtualization is a all-or-nothing game: either a kernel is compiled with no paravirtualization support at all, or it is supporting paravirtualized environments like Xen pv-guests or lguest additionally to some paravirtualized tuning for KVM, Hyperv, VMWare or Xen HVM-guests. As support of pv-guests requires quite intrusive pv-hooks (e.g. all access functions to page table entries,
2017 Nov 13
7
[PATCH RFC v3 0/6] x86/idle: add halt poll support
From: Yang Zhang <yang.zhang.wz at gmail.com> Some latency-intensive workload have seen obviously performance drop when running inside VM. The main reason is that the overhead is amplified when running inside VM. The most cost I have seen is inside idle path. This patch introduces a new mechanism to poll for a while before entering idle state. If schedule is needed during poll, then we