Skip to contentSkip to conversation

drm/amdgpu/sriov: Add MB_REQ_MSG_READY_TO_RESET response

PATCH New [email protected] 1 participant 1 message Apr 8, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/sriov: Add MB_REQ_MSG_READY_TO_RESET response

From: Jiange Zhao <[email protected]>

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.

---
 drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 1 +
 drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +1 -0
index 48e588d3c409..117d22848ee4 100644
@@ -277,6 +277,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)
 		return;
 
 	amdgpu_virt_fini_data_exchange(adev);
+	xgpu_nv_mailbox_trans_msg(adev, IDH_READY_TO_RESET, 0, 0, 0);
 	atomic_set(&adev->in_gpu_reset, 1);
 
 	do {
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h +2 -1
index 9f5808616174..73887b0aa1d6 100644
@@ -37,7 +37,8 @@ enum idh_request {
 	IDH_REQ_GPU_RESET_ACCESS,
 	IDH_REQ_GPU_INIT_DATA,
 
-	IDH_LOG_VF_ERROR       = 200,
+	IDH_LOG_VF_ERROR	= 200,
+	IDH_READY_TO_RESET 	= 201,
 };
 
 enum idh_event {
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx