drm/amdkfd: CRIU resume shared virtual memory ranges
authorRajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Mon, 8 Nov 2021 22:33:42 +0000 (17:33 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Feb 2022 22:59:53 +0000 (17:59 -0500)
commit2a909ae718715b3bac75d945e38dc0a5e4a0f1ba
treee77afa020860e9ee9ff59517e8234fa9cac599a8
parentc2db32ce77adf82dd2a4193abc709ec51474f84e
drm/amdkfd: CRIU resume shared virtual memory ranges

In CRIU resume stage, resume all the shared virtual memory ranges from
the data stored inside the resuming kfd process during CRIU restore
phase. Also setup xnack mode and free up the resources.

KFD_IOCTL_SVM_ATTR_CLR_FLAGS is not available for querying via get_attr
interface but we must clear the flags during restore as there might be
some default flags set when the prange is created. Also handle the
invalid PREFETCH atribute values saved during checkpoint by replacing
them with another dummy KFD_IOCTL_SVM_ATTR_SET_FLAGS attribute.

(rajneesh: Fixed the checkpatch reported problems)
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.c
drivers/gpu/drm/amd/amdkfd/kfd_svm.h