drm/amdgpu: process RAS fatal error MB notification
authorVignesh Chander <Vignesh.Chander@amd.com>
Mon, 24 Jun 2024 21:44:26 +0000 (16:44 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Jun 2024 21:31:37 +0000 (17:31 -0400)
commitcbda2758d8bfae323b846210a3e52f0ad5fe7164
tree034e4d34e668d0dd014fe139efa6e9736b7b28e4
parent78146c1dcd220ae98fd5f4114f992299fc5ee161
drm/amdgpu: process RAS fatal error MB notification

For RAS error scenario, VF guest driver will check mailbox
and set fed flag to avoid unnecessary HW accesses.
additionally, poll for reset completion message first
to avoid accidentally spamming multiple reset requests to host.

v2: add another mailbox check for handling case where kfd detects
timeout first

v3: set host_flr bit and use wait_for_reset

Signed-off-by: Vignesh Chander <Vignesh.Chander@amd.com>
Reviewed-by: Zhigang Luo <Zhigang.Luo@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h