drm/amdgpu: Fail DMABUF map of XGMI-accessible memory
authorFelix Kuehling <felix.kuehling@amd.com>
Thu, 17 Apr 2025 16:02:09 +0000 (12:02 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 1 May 2025 15:01:46 +0000 (11:01 -0400)
commit9397204ffae887bd557e7053609174b3eb9d6f5c
tree48cb5bca198ee65c337b754cdf08209d72908f9e
parentbe593d9d91c5a3a363d456b9aceb71029aeb3f1d
drm/amdgpu: Fail DMABUF map of XGMI-accessible memory

If peer memory is XGMI-accessible, we should never access it through PCIe
P2P DMA mappings. PCIe P2P is slower, has different coherence behaviour,
limited or no support for atomics, or may not work at all. Fail with a
warning if DMABUF mappings of such memory are attempted.

Signed-off-by: Felix Kuehling <felix.kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit dbe4c63689bc6b5fd3ab72650ea4b6a667e96a68)
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c