Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Add IDH_QUERY_ALIVE event for SR-IOV

SR-IOV host side will send IDH_QUERY_ALIVE to guest VM to check
if this guest VM is still alive (not destroyed). The only thing
guest KMD need to do is to send ACK back to host.

Signed-off-by: Trigger Huang <Trigger.Huang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Trigger Huang and committed by
Alex Deucher
b6818520 3680624e

+4
+3
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
··· 372 372 if (amdgpu_sriov_runtime(adev)) 373 373 schedule_work(&adev->virt.flr_work); 374 374 break; 375 + case IDH_QUERY_ALIVE: 376 + xgpu_ai_mailbox_send_ack(adev); 377 + break; 375 378 /* READY_TO_ACCESS_GPU is fetched by kernel polling, IRQ can ignore 376 379 * it byfar since that polling thread will handle it, 377 380 * other msg like flr complete is not handled here.
+1
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.h
··· 49 49 IDH_FLR_NOTIFICATION_CMPL, 50 50 IDH_SUCCESS, 51 51 IDH_FAIL, 52 + IDH_QUERY_ALIVE, 52 53 IDH_EVENT_MAX 53 54 }; 54 55