]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amdkfd: kfd driver supports hot unplug/replug amdgpu devices
authorXiaogang Chen <xiaogang.chen@amd.com>
Wed, 14 Jan 2026 02:45:14 +0000 (20:45 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 14 Jan 2026 19:28:49 +0000 (14:28 -0500)
commit6cca686dfce79bf5bd5c1a680ed38a9f20669e39
tree85f8807d4c0382d5a0e232d81ab87b4a64570c43
parentd81e52fc61fb98dc98f9fdb166ab21f502cb701c
drm/amdkfd: kfd driver supports hot unplug/replug amdgpu devices

This patch allows kfd driver function correctly when AMD gpu devices got
unplug/replug at run time.

When an AMD gpu device got unplug kfd driver gracefully terminates existing
kfd processes after stops all queues by sending SIGBUS to user process. After
that user space can still use remaining AMD gpu devices. When all AMD gpu
devices at system got removed kfd driver will not response new requests.

Unplugged AMD gpu devices can be re-plugged. kfd driver will use added devices
to function as usual.

The purpose of this patch is having kfd driver behavior as expected during and
after AMD gpu devices unplug/replug at run time.

Signed-off-by: Xiaogang Chen <Xiaogang.Chen@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdkfd/kfd_device.c
drivers/gpu/drm/amd/amdkfd/kfd_events.c
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.c