drm/amdkfd: handle CPU fault on COW mapping
authorPhilip Yang <Philip.Yang@amd.com>
Wed, 7 Sep 2022 16:30:12 +0000 (12:30 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 13 Sep 2022 16:54:23 +0000 (12:54 -0400)
commite1f84eef313f4820cca068a238c645d0a38c6a9b
treef1e730ba445350b3c4b70b1770294cb572f36b35
parent7a3f8b7c4cdb9d678d6311ca93e6b793e8957295
drm/amdkfd: handle CPU fault on COW mapping

If CPU page fault in a page with zone_device_data svm_bo from another
process, that means it is COW mapping in the child process and the
range is migrated to VRAM by parent process. Migrate the parent
process range back to system memory to recover the CPU page fault.

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_migrate.c