drm/i915/selftests: Verify mmap_gtt revocation on unbinding
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 7 Nov 2019 18:06:01 +0000 (18:06 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 7 Nov 2019 21:23:52 +0000 (21:23 +0000)
commit1d1d0af67939c0a99dbf352628db0016924f8613
tree73f4de8aa6fb12078ba5a7bf2658e62b29b863be
parent6fedafacae1b951af104d862888a446b6c3f3a39
drm/i915/selftests: Verify mmap_gtt revocation on unbinding

Whenever, we unbind (or change fence registers) on an object, we must
revoke any and all mmap_gtt using the previous bindings. Those user PTEs
point at the GGTT which know points into a new object, the wrong object.
Ergo, those PTEs must be cleared so that any user access provokes a new
page fault.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191107180601.30815-5-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c