GPU retry vm fault on unregistered address, new range is created to recover the retry vm fault. Instead of setting new range perferred_loc to GPU, add GPU to new range access_bitmap, to be able to update GPU page table after new range migrate to VRAM. The new range preferred_loc is default value KFD_IOCTL_SVM_LOCATION_UNDEFINED. Correct one typo. Signed-off-by: Philip Yang <Philip.Yang@xxxxxxx> --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index 3b640772d9c5..5a486e0fbf18 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c @@ -2243,7 +2243,7 @@ svm_range *svm_range_create_unregistered_range(struct amdgpu_device *adev, prange = svm_range_new(&p->svms, start, last); if (!prange) { - pr_debug("Failed to create prange in address [0x%llx]\\n", addr); + pr_debug("Failed to create prange in address [0x%llx]\n", addr); return NULL; } if (kfd_process_gpuid_from_kgd(p, adev, &gpuid, &gpuidx)) { @@ -2251,9 +2251,8 @@ svm_range *svm_range_create_unregistered_range(struct amdgpu_device *adev, svm_range_free(prange); return NULL; } - prange->preferred_loc = gpuid; - prange->actual_loc = 0; - /* Gurantee prange is migrate it */ + + bitmap_set(prange->bitmap_access, gpuidx, 1); svm_range_add_to_svms(prange); svm_range_add_notifier_locked(mm, prange); -- 2.17.1 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx