search for: mm_struct

Displaying 20 results from an estimated 665 matches for "mm_struct".

Did you mean: vm_struct
2023 Feb 07
1
[PATCH v2] x86/paravirt: merge activate_mm and dup_mmap callbacks
The two paravirt callbacks .mmu.activate_mm and .mmu.dup_mmap are sharing the same implementations in all cases: for Xen PV guests they are pinning the PGD of the new mm_struct, and for all other cases they are a NOP. In the end both callbacks are meant to register an address space with the underlying hypervisor, so there needs to be only a single callback for that purpose. So merge them to a common callback .mmu.enter_mmap (in contrast to the corresponding already exis...
2017 Sep 04
0
[PATCH] x86/paravirt: remove no longer used paravirt functions
...store_idt, dtr); -} static inline unsigned long paravirt_store_tr(void) { return PVOP_CALL0(unsigned long, pv_cpu_ops.store_tr); @@ -365,12 +356,6 @@ static inline void paravirt_release_p4d(unsigned long pfn) PVOP_VCALL1(pv_mmu_ops.release_p4d, pfn); } -static inline void pte_update(struct mm_struct *mm, unsigned long addr, - pte_t *ptep) -{ - PVOP_VCALL3(pv_mmu_ops.pte_update, mm, addr, ptep); -} - static inline pte_t __pte(pteval_t val) { pteval_t ret; @@ -472,28 +457,6 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, PVOP_VCALL4(pv_mmu_ops.set_pte_at...
2017 Sep 04
0
[PATCH] x86/paravirt: remove no longer used paravirt functions
...store_idt, dtr); -} static inline unsigned long paravirt_store_tr(void) { return PVOP_CALL0(unsigned long, pv_cpu_ops.store_tr); @@ -365,12 +356,6 @@ static inline void paravirt_release_p4d(unsigned long pfn) PVOP_VCALL1(pv_mmu_ops.release_p4d, pfn); } -static inline void pte_update(struct mm_struct *mm, unsigned long addr, - pte_t *ptep) -{ - PVOP_VCALL3(pv_mmu_ops.pte_update, mm, addr, ptep); -} - static inline pte_t __pte(pteval_t val) { pteval_t ret; @@ -472,28 +457,6 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, PVOP_VCALL4(pv_mmu_ops.set_pte_at...
2015 Nov 17
0
[PATCH] paravirt: remove paravirt ops pmd_update[_defer] and pte_update_defer
...1 - 7 files changed, 3 insertions(+), 47 deletions(-) diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 10d0596..398f068 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h @@ -375,23 +375,6 @@ static inline void pte_update(struct mm_struct *mm, unsigned long addr, { PVOP_VCALL3(pv_mmu_ops.pte_update, mm, addr, ptep); } -static inline void pmd_update(struct mm_struct *mm, unsigned long addr, - pmd_t *pmdp) -{ - PVOP_VCALL3(pv_mmu_ops.pmd_update, mm, addr, pmdp); -} - -static inline void pte_update_defer(struct mm_struct *m...
2015 Nov 17
0
[PATCH] paravirt: remove paravirt ops pmd_update[_defer] and pte_update_defer
...1 - 7 files changed, 3 insertions(+), 47 deletions(-) diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 10d0596..398f068 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h @@ -375,23 +375,6 @@ static inline void pte_update(struct mm_struct *mm, unsigned long addr, { PVOP_VCALL3(pv_mmu_ops.pte_update, mm, addr, ptep); } -static inline void pmd_update(struct mm_struct *mm, unsigned long addr, - pmd_t *pmdp) -{ - PVOP_VCALL3(pv_mmu_ops.pmd_update, mm, addr, pmdp); -} - -static inline void pte_update_defer(struct mm_struct *m...
2019 Nov 05
1
[PATCH v2 01/15] mm/mmu_notifier: define the header pre-processor parts even if disabled
...;linux/srcu.h> #include <linux/interval_tree.h> -struct mmu_notifier_mm; struct mmu_notifier; struct mmu_notifier_range; struct mmu_range_notifier; @@ -263,10 +262,7 @@ struct mmu_notifier_range { enum mmu_notifier_event event; }; -static inline int mm_has_notifiers(struct mm_struct *mm) -{ - return unlikely(mm->mmu_notifier_mm); -} +int mm_has_notifiers(struct mm_struct *mm); struct mmu_notifier *mmu_notifier_get_locked(const struct mmu_notifier_ops *ops, struct mm_struct *mm); @@ -477,10 +473,7 @@ static inline void mm...
2019 Nov 12
0
[PATCH v3 02/14] mm/mmu_notifier: add an interval tree notifier
...mmu_interval_notifier_ops { + bool (*invalidate)(struct mmu_interval_notifier *mni, + const struct mmu_notifier_range *range, + unsigned long cur_seq); +}; + +struct mmu_interval_notifier { + struct interval_tree_node interval_tree; + const struct mmu_interval_notifier_ops *ops; + struct mm_struct *mm; + struct hlist_node deferred_item; + unsigned long invalidate_seq; +}; + #ifdef CONFIG_MMU_NOTIFIER #ifdef CONFIG_LOCKDEP @@ -263,6 +289,81 @@ extern int __mmu_notifier_register(struct mmu_notifier *mn, struct mm_struct *mm); extern void mmu_notifier_unregister(struct mmu_notifier...
2019 Oct 28
0
[PATCH v2 02/15] mm/mmu_notifier: add an interval tree notifier
...mu_range_notifier *mrn, + const struct mmu_notifier_range *range, + unsigned long cur_seq); +}; + +struct mmu_range_notifier { + struct interval_tree_node interval_tree; + const struct mmu_range_notifier_ops *ops; + struct hlist_node deferred_item; + unsigned long invalidate_seq; + struct mm_struct *mm; +}; + #ifdef CONFIG_MMU_NOTIFIER #ifdef CONFIG_LOCKDEP @@ -263,6 +289,78 @@ extern int __mmu_notifier_register(struct mmu_notifier *mn, struct mm_struct *mm); extern void mmu_notifier_unregister(struct mmu_notifier *mn, struct mm_struct *mm); + +unsigned long mmu_range_re...
2007 Apr 18
2
[PATCH 21/21] i386 Ldt context inline
...2.6.14-zach-work.orig/include/asm-i386/mmu_context.h 2005-11-05 02:30:35.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/mmu_context.h 2005-11-05 02:32:51.000000000 -0800 @@ -10,9 +10,28 @@ /* * Used for LDT copy/destruction. */ -int init_new_context(struct task_struct *tsk, struct mm_struct *mm); -void destroy_context(struct mm_struct *mm); +static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) +{ + struct mm_struct * old_mm; + int retval = 0; + + memset(&mm->context, 0, sizeof(mm->context)); + init_MUTEX(&mm->context.sem); + old_mm = curre...
2007 Apr 18
2
[PATCH 21/21] i386 Ldt context inline
...2.6.14-zach-work.orig/include/asm-i386/mmu_context.h 2005-11-05 02:30:35.000000000 -0800 +++ linux-2.6.14-zach-work/include/asm-i386/mmu_context.h 2005-11-05 02:32:51.000000000 -0800 @@ -10,9 +10,28 @@ /* * Used for LDT copy/destruction. */ -int init_new_context(struct task_struct *tsk, struct mm_struct *mm); -void destroy_context(struct mm_struct *mm); +static inline int init_new_context(struct task_struct *tsk, struct mm_struct *mm) +{ + struct mm_struct * old_mm; + int retval = 0; + + memset(&mm->context, 0, sizeof(mm->context)); + init_MUTEX(&mm->context.sem); + old_mm = curre...
2007 Apr 18
0
[PATCH 12/14] i386 / Move context switch inline
..., 0, old->size, 0); + if (!err) + memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE); + up(&old->sem); + return err; } -/* - * we do not have to muck with descriptors here, that is - * done in switch_mm() as needed. - */ -int init_new_context(struct task_struct *tsk, struct mm_struct *mm) +void destroy_ldt(struct mm_struct *mm) { - struct mm_struct * old_mm; - int retval = 0; - - init_MUTEX(&mm->context.sem); + if (mm == current->active_mm) + clear_LDT(); + if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE) + vfree(mm->context.ldt); + else + kfree(mm->co...
2007 Apr 18
0
[PATCH 12/14] i386 / Move context switch inline
..., 0, old->size, 0); + if (!err) + memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE); + up(&old->sem); + return err; } -/* - * we do not have to muck with descriptors here, that is - * done in switch_mm() as needed. - */ -int init_new_context(struct task_struct *tsk, struct mm_struct *mm) +void destroy_ldt(struct mm_struct *mm) { - struct mm_struct * old_mm; - int retval = 0; - - init_MUTEX(&mm->context.sem); + if (mm == current->active_mm) + clear_LDT(); + if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE) + vfree(mm->context.ldt); + else + kfree(mm->co...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 01/17] paravirt_ops - core changes
...) +{ + return (pte_t){ pte }; +} + +pud_t native_make_pud(unsigned long pud) +{ + return (pud_t){ pud }; +} + +pmd_t native_make_pmd(unsigned long pmd) +{ + return (pmd_t){ pmd }; +} + +pgd_t native_make_pgd(unsigned long pgd) +{ + return (pgd_t){ pgd }; +} + +pte_t native_ptep_get_and_clear(struct mm_struct *mm, u64 addr, + pte_t *ptep) +{ + return __pte(xchg(&(ptep)->pte, 0)); +} + +void native_set_pte_at(struct mm_struct *mm, u64 addr, pte_t *ptep, + pte_t pteval) +{ + native_set_pte(ptep,pteval); +} + +void native_pte_clear(struct mm_struct *mm, u64 addr, pte_t *ptep) +{ + native_set...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 01/17] paravirt_ops - core changes
...) +{ + return (pte_t){ pte }; +} + +pud_t native_make_pud(unsigned long pud) +{ + return (pud_t){ pud }; +} + +pmd_t native_make_pmd(unsigned long pmd) +{ + return (pmd_t){ pmd }; +} + +pgd_t native_make_pgd(unsigned long pgd) +{ + return (pgd_t){ pgd }; +} + +pte_t native_ptep_get_and_clear(struct mm_struct *mm, u64 addr, + pte_t *ptep) +{ + return __pte(xchg(&(ptep)->pte, 0)); +} + +void native_set_pte_at(struct mm_struct *mm, u64 addr, pte_t *ptep, + pte_t pteval) +{ + native_set_pte(ptep,pteval); +} + +void native_pte_clear(struct mm_struct *mm, u64 addr, pte_t *ptep) +{ + native_set...
2020 Apr 04
14
improve use_mm / unuse_mm
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API.
2020 Apr 04
14
improve use_mm / unuse_mm
Hi all, this series improves the use_mm / unuse_mm interface by better documenting the assumptions, and my taking the set_fs manipulations spread over the callers into the core API.
2015 Nov 17
1
[PATCH] paravirt: remove paravirt ops pmd_update_defer and pte_update_defer
...1 - 7 files changed, 2 insertions(+), 30 deletions(-) diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 10d0596..10c39b9 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h @@ -381,18 +381,6 @@ static inline void pmd_update(struct mm_struct *mm, unsigned long addr, PVOP_VCALL3(pv_mmu_ops.pmd_update, mm, addr, pmdp); } -static inline void pte_update_defer(struct mm_struct *mm, unsigned long addr, - pte_t *ptep) -{ - PVOP_VCALL3(pv_mmu_ops.pte_update_defer, mm, addr, ptep); -} - -static inline void pmd_update_defer(struct mm...
2015 Nov 17
1
[PATCH] paravirt: remove paravirt ops pmd_update_defer and pte_update_defer
...1 - 7 files changed, 2 insertions(+), 30 deletions(-) diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index 10d0596..10c39b9 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h @@ -381,18 +381,6 @@ static inline void pmd_update(struct mm_struct *mm, unsigned long addr, PVOP_VCALL3(pv_mmu_ops.pmd_update, mm, addr, pmdp); } -static inline void pte_update_defer(struct mm_struct *mm, unsigned long addr, - pte_t *ptep) -{ - PVOP_VCALL3(pv_mmu_ops.pte_update_defer, mm, addr, ptep); -} - -static inline void pmd_update_defer(struct mm...
2009 Aug 13
0
[PATCHv3 1/2] mm: export use_mm/unuse_mm to modules
...ified - * mm context. - * Called by the retry thread execute retries within the - * iocb issuer's mm context, so that copy_from/to_user - * operations work seamlessly for aio. - * (Note: this routine is intended to be called only - * from a kernel thread context) - */ -static void use_mm(struct mm_struct *mm) -{ - struct mm_struct *active_mm; - struct task_struct *tsk = current; - - task_lock(tsk); - active_mm = tsk->active_mm; - atomic_inc(&mm->mm_count); - tsk->mm = mm; - tsk->active_mm = mm; - switch_mm(active_mm, mm, tsk); - task_unlock(tsk); - - mmdrop(active_mm); -} - -/* - *...
2009 Aug 13
0
[PATCHv3 1/2] mm: export use_mm/unuse_mm to modules
...ified - * mm context. - * Called by the retry thread execute retries within the - * iocb issuer's mm context, so that copy_from/to_user - * operations work seamlessly for aio. - * (Note: this routine is intended to be called only - * from a kernel thread context) - */ -static void use_mm(struct mm_struct *mm) -{ - struct mm_struct *active_mm; - struct task_struct *tsk = current; - - task_lock(tsk); - active_mm = tsk->active_mm; - atomic_inc(&mm->mm_count); - tsk->mm = mm; - tsk->active_mm = mm; - switch_mm(active_mm, mm, tsk); - task_unlock(tsk); - - mmdrop(active_mm); -} - -/* - *...