search for: vm_fault

Displaying 20 results from an estimated 161 matches for "vm_fault".

2011 Nov 29
3
[PATCH] fs: push file_update_time into ->page_mkwrite
...------ security/selinux/selinuxfs.c | 1 + 15 files changed, 14 insertions(+), 8 deletions(-) diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 62857a8..ae2968f 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -610,6 +610,7 @@ v9fs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) P9_DPRINTK(P9_DEBUG_VFS, "page %p fid %lx\n", page, (unsigned long)filp->private_data); + file_update_time(filp); v9inode = V9FS_I(inode); /* make sure the cache has finished storing the page */ v9fs_fscache_wait_on_page_write(inode, page); diff --git a/fs/btrfs/i...
2024 Jan 22
2
[PATCH] mm: Remove double faults once write a device pfn
...+++++++++--- > 10 files changed, 30 insertions(+), 16 deletions(-) > > diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c > index 7645730dc228..dd2431c2975f 100644 > --- a/arch/x86/entry/vdso/vma.c > +++ b/arch/x86/entry/vdso/vma.c > @@ -185,7 +185,8 @@ static vm_fault_t vvar_fault(const struct vm_special_mapping *sm, > if (pvti && vclock_was_used(VDSO_CLOCKMODE_PVCLOCK)) { > return vmf_insert_pfn_prot(vma, vmf->address, > __pa(pvti) >> PAGE_SHIFT, > - pgprot_decrypted(vma->vm_page_prot)); > + pgprot_decr...
2024 Jan 24
1
[PATCH] mm: Remove double faults once write a device pfn
...When userspace mmap() with PROT_WRITE and MAP_SHARED the > vma->vm_page_prot has the PTE_RDONLY and PTE_WRITE within > PAGE_SHARED_EXEC. (seeing arm64 protection_map) > > When write the userspace virtual address the first fault happen and call > into driver's .fault->ttm_bo_vm_fault_reserved->vmf_insert_pfn_prot->insert_pfn. > The insert_pfn will establish the pte entry. However the vmf_insert_pfn_prot > pass false @mkwrite to insert_pfn by default and so insert_pfn could not make > the pfn writable and it do not call maybe_mkwrite(pte_mkdirty(entry), vma) >...
2024 Jan 23
2
[PATCH] mm: Remove double faults once write a device pfn
...ons(+), 16 deletions(-) >>> >>> diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c >>> index 7645730dc228..dd2431c2975f 100644 >>> --- a/arch/x86/entry/vdso/vma.c >>> +++ b/arch/x86/entry/vdso/vma.c >>> @@ -185,7 +185,8 @@ static vm_fault_t vvar_fault(const struct >> vm_special_mapping *sm, >>> if (pvti && vclock_was_used(VDSO_CLOCKMODE_PVCLOCK)) >> { >>> return vmf_insert_pfn_prot(vma, vmf->address, >>> __pa(pvti...
2024 Jan 24
2
[PATCH] mm: Remove double faults once write a device pfn
...;>>>> diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c >>>>> index 7645730dc228..dd2431c2975f 100644 >>>>> --- a/arch/x86/entry/vdso/vma.c >>>>> +++ b/arch/x86/entry/vdso/vma.c >>>>> @@ -185,7 +185,8 @@ static vm_fault_t vvar_fault(const struct >>>> vm_special_mapping *sm, >>>>> if (pvti && vclock_was_used(VDSO_CLOCKMODE_PVCLOCK)) >>>> { >>>>> return vmf_insert_pfn_prot(vma, vmf->address, >>>>>...
2018 Apr 15
0
[RFC] Rewrite page fault interception in TTM drivers
...- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -102,21 +102,23 @@ static void qxl_ttm_global_fini(struct qxl_device *qdev) } } -static struct vm_operations_struct qxl_ttm_vm_ops; -static const struct vm_operations_struct *ttm_vm_ops; - static int qxl_ttm_fault(struct vm_fault *vmf) { struct ttm_buffer_object *bo; - int r; bo = (struct ttm_buffer_object *)vmf->vma->vm_private_data; if (bo == NULL) return VM_FAULT_NOPAGE; - r = ttm_vm_ops->fault(vmf); - return r; + return ttm_bo_vm_fault(vmf); } +static const struct vm_operations_struct qxl_ttm_vm_...
2013 Apr 06
1
[PATCH 3/4] fsfreeze: manage kill signal when sb_start_pagefault is called
In every place where sb_start_pagefault was called now we must manage the error code and return VM_FAULT_RETRY. Signed-off-by: Marco Stornelli <marco.stornelli at gmail.com> --- fs/btrfs/inode.c | 4 +++- fs/buffer.c | 4 +++- fs/ext4/inode.c | 4 +++- fs/f2fs/file.c | 4 +++- fs/gfs2/file.c | 4 +++- fs/nilfs2/file.c | 4 +++- fs/ocfs2/mmap.c | 4...
2008 May 14
1
RELENG_6 regression: panic: vm_fault on nofault entry, addr: c8000000
Hi, there's a regression going from 6.2 to 6.3, where it will panic upon booting the kernel within vm_fault. This problem has been discussed before, but I'm seeing it reliably on a RELENG_6 checkout from 5th of May. It affects multiple (but identical) systems, here's an verbose boot leading to the panic. Please note that 6.2 was running fine on these machines, they also boot "normally"...
2020 Sep 23
1
[PATCH v3 03/22] drm/etnaviv: Introduce GEM object functions
...9236e5f..914f0867ff71 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.h @@ -49,7 +49,6 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data, struct drm_file *file); int etnaviv_gem_mmap(struct file *filp, struct vm_area_struct *vma); -vm_fault_t etnaviv_gem_fault(struct vm_fault *vmf); int etnaviv_gem_mmap_offset(struct drm_gem_object *obj, u64 *offset); struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj); void *etnaviv_gem_prime_vmap(struct drm_gem_object *obj); diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem...
2020 Sep 15
0
[PATCH v2 05/21] drm/gma500: Introduce GEM object functions
...diff --git a/drivers/gpu/drm/gma500/gem.c b/drivers/gpu/drm/gma500/gem.c index f9c4b1d76f56..8f07de83b6fb 100644 --- a/drivers/gpu/drm/gma500/gem.c +++ b/drivers/gpu/drm/gma500/gem.c @@ -18,7 +18,9 @@ #include "psb_drv.h" -void psb_gem_free_object(struct drm_gem_object *obj) +static vm_fault_t psb_gem_fault(struct vm_fault *vmf); + +static void psb_gem_free_object(struct drm_gem_object *obj) { struct gtt_range *gtt = container_of(obj, struct gtt_range, gem); @@ -36,6 +38,17 @@ int psb_gem_get_aperture(struct drm_device *dev, void *data, return -EINVAL; } +static const struct...
2023 Mar 28
3
[PATCH] mm: Take a page reference when removing device exclusive entries
...device exclusive memory access") Cc: stable at vger.kernel.org --- mm/memory.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index 8c8420934d60..b499bd283d8e 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3623,8 +3623,19 @@ static vm_fault_t remove_device_exclusive_entry(struct vm_fault *vmf) struct vm_area_struct *vma = vmf->vma; struct mmu_notifier_range range; - if (!folio_lock_or_retry(folio, vma->vm_mm, vmf->flags)) + /* + * We need a page reference to lock the page because we don't + * hold the PTL so a rac...
2018 Apr 23
3
[PATCH] gpu: drm: qxl: Adding new typedef vm_fault_t
On Tue, Apr 17, 2018 at 07:08:44PM +0530, Souptick Joarder wrote: > Use new return type vm_fault_t for fault handler. For > now, this is just documenting that the function returns > a VM_FAULT value rather than an errno. Once all instances > are converted, vm_fault_t will become a distinct type. > > Reference id -> 1c8f422059ae ("mm: change return type to > vm_fault_...
2018 Apr 23
3
[PATCH] gpu: drm: qxl: Adding new typedef vm_fault_t
On Tue, Apr 17, 2018 at 07:08:44PM +0530, Souptick Joarder wrote: > Use new return type vm_fault_t for fault handler. For > now, this is just documenting that the function returns > a VM_FAULT value rather than an errno. Once all instances > are converted, vm_fault_t will become a distinct type. > > Reference id -> 1c8f422059ae ("mm: change return type to > vm_fault_...
2020 Aug 13
0
[PATCH 10/20] drm/omapdrm: Introduce GEM object functions
....dumb_map_offset = omap_gem_dumb_map_offset, .ioctls = ioctls, diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index d0d12d5dd76c..d68dc63dea0a 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -487,7 +487,7 @@ static vm_fault_t omap_gem_fault_2d(struct drm_gem_object *obj, * vma->vm_private_data points to the GEM object that is backing this * mapping. */ -vm_fault_t omap_gem_fault(struct vm_fault *vmf) +static vm_fault_t omap_gem_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; struc...
2020 Sep 15
0
[PATCH v2 08/21] drm/msm: Introduce GEM object funcs
...44 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -269,7 +269,6 @@ void msm_gem_shrinker_cleanup(struct drm_device *dev); int msm_gem_mmap_obj(struct drm_gem_object *obj, struct vm_area_struct *vma); int msm_gem_mmap(struct file *filp, struct vm_area_struct *vma); -vm_fault_t msm_gem_fault(struct vm_fault *vmf); uint64_t msm_gem_mmap_offset(struct drm_gem_object *obj); int msm_gem_get_iova(struct drm_gem_object *obj, struct msm_gem_address_space *aspace, uint64_t *iova); diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c index b4553caaa196...
2020 Sep 15
0
[PATCH v2 03/21] drm/etnaviv: Introduce GEM object functions
...9236e5f..914f0867ff71 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.h @@ -49,7 +49,6 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data, struct drm_file *file); int etnaviv_gem_mmap(struct file *filp, struct vm_area_struct *vma); -vm_fault_t etnaviv_gem_fault(struct vm_fault *vmf); int etnaviv_gem_mmap_offset(struct drm_gem_object *obj, u64 *offset); struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj); void *etnaviv_gem_prime_vmap(struct drm_gem_object *obj); diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem...
2020 Sep 23
0
[PATCH v3 03/22] drm/etnaviv: Introduce GEM object functions
...-- a/drivers/gpu/drm/etnaviv/etnaviv_drv.h > +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.h > @@ -49,7 +49,6 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data, > struct drm_file *file); > > int etnaviv_gem_mmap(struct file *filp, struct vm_area_struct *vma); > -vm_fault_t etnaviv_gem_fault(struct vm_fault *vmf); > int etnaviv_gem_mmap_offset(struct drm_gem_object *obj, u64 *offset); > struct sg_table *etnaviv_gem_prime_get_sg_table(struct drm_gem_object *obj); > void *etnaviv_gem_prime_vmap(struct drm_gem_object *obj); > diff --git a/drivers/gpu/drm...
2020 Sep 01
0
[PATCH 3/3] drm/ttm: remove io_reserve_lru handling v2
...;mem); - ttm_mem_io_unlock(man); map->virtual = NULL; map->page = NULL; } diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index 0b805f72d18e..d3dc0682425c 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c @@ -281,8 +281,6 @@ vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf, pgoff_t i; vm_fault_t ret = VM_FAULT_NOPAGE; unsigned long address = vmf->address; - struct ttm_resource_manager *man = - ttm_manager_type(bdev, bo->mem.mem_type); /* * Refuse to fault imported pages. This should be handled @@ -32...
2023 Mar 30
4
[PATCH v2] mm: Take a page reference when removing device exclusive entries
...ched to using folios (thanks Matthew!) - Added Reviewed-by's --- mm/memory.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index f456f3b5049c..01a23ad48a04 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3563,8 +3563,21 @@ static vm_fault_t remove_device_exclusive_entry(struct vm_fault *vmf) struct vm_area_struct *vma = vmf->vma; struct mmu_notifier_range range; - if (!folio_lock_or_retry(folio, vma->vm_mm, vmf->flags)) + /* + * We need a reference to lock the folio because we don't hold + * the PTL so a racing...
2019 Nov 20
2
Move io_reserve_lru handling into the driver
Just a gentle ping on this. Already got the Acked-by from Daniel, but I need some of the nouveau guys to test this since I can only compile test it. Regards, Christian.