drm/amdgpu: Add MB_REQ_MSG_READY_TO_RESET response when VF get FLR notification.
Subsystems (2)
PATCH 1/1 drm/amdgpu: Add MB_REQ_MSG_READY_TO_RESET response when VF get FLR notification.
From: Jiange Zhao <[email protected]>
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 | 2 ++ drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +2 -0
@@ -287,6 +287,8 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)amdgpu_virt_fini_data_exchange (adev);atomic_set (&adev->in_gpu_reset,1 ); +xgpu_nv_mailbox_trans_msg (adev,IDH_READY_TO_RESET ,0 ,0 ,0 ); + do { if (xgpu_nv_mailbox_peek_msg(adev) == IDH_FLR_NOTIFICATION_CMPL) goto flr_done;
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h +2 -1
@@ -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 · 1 line
2.17.1
[AMD Official Use Only]
ping
Quoted 57 lines
-----Original Message-----
From: Peng Ju Zhou <[email protected]>
Sent: Monday, August 9, 2021 5:37 PM
To: [email protected]
Cc: Zhao, Jiange <[email protected]>; Zhou, Peng Ju <[email protected]>
Subject: [PATCH] drm/amdgpu: AddMB_REQ_MSG_READY_TO_RESETresponse when VF get FLR notification.From: Jiange Zhao <[email protected]>
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 <[email protected]>Signed-off-by Peng Ju Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 2 ++ drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +2
-0@@ -287,6 +287,8 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)amdgpu_virt_fini_data_exchange (adev );atomic_set (&adev->in_gpu_reset,1 ); +xgpu_nv_mailbox_trans_msg (adev,IDH_READY_TO_RESET ,0 ,0 ,0 ); + do { if (xgpu_nv_mailbox_peek_msg(adev) ==
IDH_FLR_NOTIFICATION_CMPL)drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +0
-0goto flr_done;drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h +2
-2@@ -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 { --2.17.1
Deng, Emily
Reviewed-byQuoted 71 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Zhou, Peng Ju
Sent: Thursday, August 12, 2021 4:28 PM
To: Zhou, Peng Ju <[email protected]>; [email protected]
Cc: Zhao, Jiange <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: AddMB_REQ_MSG_READY_TO_RESETresponse when VF get FLR notification.[AMD Official Use Only]
ping
Quoted 7 lines
-----Original Message-----
From: Peng Ju Zhou <[email protected]>
Sent: Monday, August 9, 2021 5:37 PM
To: [email protected]
Cc: Zhao, Jiange <[email protected]>; Zhou, Peng Ju <[email protected]>
Subject: [PATCH] drm/amdgpu: AddMB_REQ_MSG_READY_TO_RESETresponse
Quoted 50 lines
when VF get FLR notification.
From: Jiange Zhao <[email protected]>
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 <[email protected]>Signed-off-by Peng Ju Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 2 ++ drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +2
-0@@ -287,6 +287,8 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)amdgpu_virt_fini_data_exchange (adev );atomic_set (&adev->in_gpu_reset,1 ); +xgpu_nv_mailbox_trans_msg (adev,IDH_READY_TO_RESET ,0 ,0 ,0 ); + do { if (xgpu_nv_mailbox_peek_msg(adev) ==
IDH_FLR_NOTIFICATION_CMPL)drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c +0
-0goto flr_done;drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h +2
-2@@ -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 { --2.17.1