drm/amdkfd: check access permisson to restore retry fault
authorPhilip Yang <Philip.Yang@amd.com>
Sun, 15 Aug 2021 18:42:33 +0000 (14:42 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 24 Aug 2021 19:36:50 +0000 (15:36 -0400)
commitff891a2e6431f79c239ab0c5bc05834c0235821c
treef99afb9cc385479ab414090b06dd0f30e1c88ba9
parentf24d991bb9641d9467d2a0096239c58bf3d2b388
drm/amdkfd: check access permisson to restore retry fault

Check range access permission to restore GPU retry fault, if GPU retry
fault on address which belongs to VMA, and VMA has no read or write
permission requested by GPU, failed to restore the address. The vm fault
event will pass back to user space.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.h