Re: [PATCH v2] drm/cma-helper: Set VM_DONTEXPAND for mmap

2021-10-13 Thread Robin Murphy
Hi Daniel, On 2021-10-13 18:08, Daniel Vetter wrote: On Wed, Oct 13, 2021 at 10:36:54AM -0400, Alyssa Rosenzweig wrote: From: Robin Murphy drm_gem_cma_mmap() cannot assume every implementation of dma_mmap_wc() will end up calling remap_pfn_range() (which happens to set the relevant vma flag,

Re: [PATCH v2] drm/cma-helper: Set VM_DONTEXPAND for mmap

2021-10-13 Thread Alyssa Rosenzweig
> > From: Robin Murphy > > > > drm_gem_cma_mmap() cannot assume every implementation of dma_mmap_wc() > > will end up calling remap_pfn_range() (which happens to set the relevant > > vma flag, among others), so in order to make sure expectations around > > VM_DONTEXPAND are met, let it explicitly

Re: [PATCH v2] drm/cma-helper: Set VM_DONTEXPAND for mmap

2021-10-13 Thread Daniel Vetter
On Wed, Oct 13, 2021 at 10:36:54AM -0400, Alyssa Rosenzweig wrote: > From: Robin Murphy > > drm_gem_cma_mmap() cannot assume every implementation of dma_mmap_wc() > will end up calling remap_pfn_range() (which happens to set the relevant > vma flag, among others), so in order to make sure expecta

[PATCH v2] drm/cma-helper: Set VM_DONTEXPAND for mmap

2021-10-13 Thread Alyssa Rosenzweig
From: Robin Murphy drm_gem_cma_mmap() cannot assume every implementation of dma_mmap_wc() will end up calling remap_pfn_range() (which happens to set the relevant vma flag, among others), so in order to make sure expectations around VM_DONTEXPAND are met, let it explicitly set the flag like most