]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/amdkfd: handle stale retry fault
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 20 Apr 2021 01:19:57 +0000 (21:19 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Apr 2021 03:36:05 +0000 (23:36 -0400)
commit373e3ccd859b4bc52ccb511e00b0c14e7e57430a
treef8800c10fc12c7fa1df0a3b3f12a4829fedabc09
parent11dd55d1743881c7c8f62171066292fc034e1c3c
drm/amdkfd: handle stale retry fault

Retry fault interrupt maybe pending in IH ring after GPU page table
is updated to recover the vm fault, because each page of the range
generate retry fault interrupt. There is race if application unmap
range to remove and free the range first and then retry fault work
restore_pages handle the retry fault interrupt, because range can not be
found, this vm fault can not be recovered and report incorrect GPU vm
fault to application.

Before unmap to remove and free range, drain retry fault interrupt
from IH ring1 to ensure no retry fault comes after the range is removed.

Drain retry fault interrupt skip the range which is on deferred list
to remove, or the range is child range, which is split by unmap, does
not add to svms and have interval notifier.

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/amdkfd/kfd_svm.c