[PATCH 21.40 2/2] drm/amdgpu: Temporary exclude GTT BOs from KFD memory attachment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



kfd_mem_attach is not sharing GTT BOs correctly between processes. This
can cause kernel panics due to NULL pointers depending on which
processes hold references to specific GTT BOs. Temporarily disable this
functionality for now while a proper code refactor and proper fix is
done.

Note that since we don't fully support IOMMU in device-isolation mode at
this time, this temporary workaround won't break anything that isn't
already broken.

Signed-off-by: Kent Russell <kent.russell@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 8d30ccd70800..13b80934d119 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -769,6 +769,7 @@ static int kfd_mem_attach(struct amdgpu_device *adev, struct kgd_mem *mem,
 			ret = kfd_mem_attach_userptr(adev, mem, &bo[i]);
 			if (ret)
 				goto unwind;
+#if 0
 #ifdef AMDKCL_AMDGPU_DMABUF_OPS
 		} else if (mem->domain == AMDGPU_GEM_DOMAIN_GTT &&
 			   mem->bo->tbo.type != ttm_bo_type_sg) {
@@ -780,6 +781,7 @@ static int kfd_mem_attach(struct amdgpu_device *adev, struct kgd_mem *mem,
 			ret = kfd_mem_attach_dmabuf(adev, mem, &bo[i]);
 			if (ret)
 				goto unwind;
+#endif
 #endif
 		/* Enable peer acces to VRAM BO's */
 		} else if (mem->domain == AMDGPU_GEM_DOMAIN_VRAM &&
-- 
2.25.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux