[PATCH kernel v5 03/20] powerpc/vfio/iommu/kvm: Do not pin device memory

Paul Mackerras paulus at ozlabs.org
Fri Dec 14 14:18:39 AEDT 2018


On Thu, Dec 13, 2018 at 05:17:17PM +1100, Alexey Kardashevskiy wrote:
> This new memory does not have page structs as it is not plugged to
> the host so gup() will fail anyway.
> 
> This adds 2 helpers:
> - mm_iommu_newdev() to preregister the "memory device" memory so
> the rest of API can still be used;
> - mm_iommu_is_devmem() to know if the physical address is one of thise
> new regions which we must avoid unpinning of.
> 
> This adds @mm to tce_page_is_contained() and iommu_tce_xchg() to test
> if the memory is device memory to avoid pfn_to_page().
> 
> This adds a check for device memory in mm_iommu_ua_mark_dirty_rm() which
> does delayed pages dirtying.
> 
> Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>

Reviewed-by: Paul Mackerras <paulus at ozlabs.org>


More information about the Linuxppc-dev mailing list