linux_dsm_epyc7002/drivers/gpu/drm/ttm
Thomas Hellstrom 5379e4dd32 mm, drm/ttm: Fix vm page protection handling
TTM graphics buffer objects may, transparently to user-space,  move
between IO and system memory. When that happens, all PTEs pointing to the
old location are zapped before the move and then faulted in again if
needed. When that happens, the page protection caching mode- and
encryption bits may change and be different from those of
struct vm_area_struct::vm_page_prot.

We were using an ugly hack to set the page protection correctly.
Fix that and instead export and use vmf_insert_mixed_prot() or use
vmf_insert_pfn_prot().
Also get the default page protection from
struct vm_area_struct::vm_page_prot rather than using vm_get_page_prot().
This way we catch modifications done by the vm system for drivers that
want write-notification.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: "Christian König" <christian.koenig@amd.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Andrew Morton <akpm@linux-foundation.org>
2020-01-16 10:32:41 +01:00
..
Makefile drm/ttm, drm/vmwgfx: Use a configuration option for the TTM dma page pool 2019-11-14 08:41:23 +01:00
ttm_agp_backend.c drm/ttm: remove pointers to globals 2019-10-25 11:40:51 +02:00
ttm_bo_manager.c Add SPDX idenitifier and clarify license 2018-05-15 13:44:27 -05:00
ttm_bo_util.c drm/ttm: remove ttm_bo_wait_unreserved 2019-11-06 11:24:14 +01:00
ttm_bo_vm.c mm, drm/ttm: Fix vm page protection handling 2020-01-16 10:32:41 +01:00
ttm_bo.c drm-misc-next for v5.6: 2019-12-17 13:57:54 +01:00
ttm_execbuf_util.c drm/ttm: remove pointers to globals 2019-10-25 11:40:51 +02:00
ttm_memory.c drm/ttm: remove pointers to globals 2019-10-25 11:40:51 +02:00
ttm_module.c Add SPDX idenitifier and clarify license 2018-05-15 13:44:27 -05:00
ttm_page_alloc_dma.c drm/ttm, drm/vmwgfx: Use a configuration option for the TTM dma page pool 2019-11-14 08:41:23 +01:00
ttm_page_alloc.c drm/ttm: remove pointers to globals 2019-10-25 11:40:51 +02:00
ttm_tt.c drm/ttm: ttm_tt_init_fields() can be static 2019-11-04 13:02:34 +01:00