Alexey Kardashevskiy c10c21efa4 powerpc/vfio/iommu/kvm: Do not pin device memory
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@ozlabs.ru>
Reviewed-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-12-21 16:20:46 +11:00
..
2018-08-17 11:32:50 -07:00
2015-05-28 15:31:53 +02:00
2016-03-04 23:50:27 -06:00
2018-06-03 20:32:02 +10:00
2018-06-07 10:23:33 -07:00
2018-12-19 18:56:32 +11:00
2018-10-26 14:36:21 -07:00
2018-08-17 11:32:50 -07:00
2016-03-01 19:27:20 +11:00
2018-12-19 18:56:26 +11:00
2018-12-20 22:21:20 +11:00
2018-05-07 07:15:41 +02:00
2017-11-16 12:47:46 -08:00
2018-12-20 22:21:20 +11:00
2016-06-14 13:58:26 +10:00
2018-09-18 17:52:15 -05:00
2018-10-31 08:54:12 -07:00
2016-06-14 13:58:26 +10:00
2018-05-25 12:04:43 +10:00
2018-06-03 21:19:40 +10:00
2018-01-15 09:35:26 +01:00
2018-07-30 22:48:21 +10:00
2018-10-20 13:26:47 +11:00
2016-06-14 13:58:26 +10:00
2017-11-12 09:03:10 +11:00
2015-05-05 13:35:39 -06:00