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

drm/amdgpu: Add MB_REQ_MSG_READY_TO_RESET response when VF get FLR notification.

When guest received FLR notification from host, it would
lock adapter into reset state. There will be no more
job submission and hardware access after that.

Then it should send a response to host that it has prepared
for host reset.

Signed-off-by: Jiange Zhao <Jiange.Zhao@amd.com>
Signed-off-by: Peng Ju Zhou <PengJu.Zhou@amd.com>
Reviewed-by: Emily.Deng <Emily.Deng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Jiange Zhao and committed by
Alex Deucher
3e183e2f 1d0e622f

+4 -1
+2
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
··· 287 287 amdgpu_virt_fini_data_exchange(adev); 288 288 atomic_set(&adev->in_gpu_reset, 1); 289 289 290 + xgpu_nv_mailbox_trans_msg(adev, IDH_READY_TO_RESET, 0, 0, 0); 291 + 290 292 do { 291 293 if (xgpu_nv_mailbox_peek_msg(adev) == IDH_FLR_NOTIFICATION_CMPL) 292 294 goto flr_done;
+2 -1
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
··· 37 37 IDH_REQ_GPU_RESET_ACCESS, 38 38 IDH_REQ_GPU_INIT_DATA, 39 39 40 - IDH_LOG_VF_ERROR = 200, 40 + IDH_LOG_VF_ERROR = 200, 41 + IDH_READY_TO_RESET = 201, 41 42 }; 42 43 43 44 enum idh_event {