All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Add MB_REQ_MSG_READY_TO_RESET response when VF get FLR notification.
@ 2021-08-09  9:36 Peng Ju Zhou
  2021-08-12  8:28 ` Zhou, Peng Ju
  0 siblings, 1 reply; 3+ messages in thread
From: Peng Ju Zhou @ 2021-08-09  9:36 UTC (permalink / raw)
  To: amd-gfx; +Cc: Jiange Zhao, Peng Ju Zhou

From: Jiange Zhao <Jiange.Zhao@amd.com>

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>
---
 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(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
index b48e68f46a5c..a35e6d87e537 100644
--- a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
@@ -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;
diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
index 9f5808616174..73887b0aa1d6 100644
--- a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
+++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
@@ -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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] drm/amdgpu: Add MB_REQ_MSG_READY_TO_RESET response when VF get FLR notification.
  2021-08-09  9:36 [PATCH] drm/amdgpu: Add MB_REQ_MSG_READY_TO_RESET response when VF get FLR notification Peng Ju Zhou
@ 2021-08-12  8:28 ` Zhou, Peng Ju
  2021-08-12  8:34   ` Deng, Emily
  0 siblings, 1 reply; 3+ messages in thread
From: Zhou, Peng Ju @ 2021-08-12  8:28 UTC (permalink / raw)
  To: Zhou, Peng Ju, amd-gfx; +Cc: Zhao, Jiange

[AMD Official Use Only]

ping

> -----Original Message-----
> From: Peng Ju Zhou <PengJu.Zhou@amd.com>
> Sent: Monday, August 9, 2021 5:37 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Zhao, Jiange <Jiange.Zhao@amd.com>; Zhou, Peng Ju
> <PengJu.Zhou@amd.com>
> Subject: [PATCH] drm/amdgpu: Add MB_REQ_MSG_READY_TO_RESET
> response when VF get FLR notification.
> 
> From: Jiange Zhao <Jiange.Zhao@amd.com>
> 
> 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>
> ---
>  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(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
> b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
> index b48e68f46a5c..a35e6d87e537 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
> @@ -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;
> diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
> b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
> index 9f5808616174..73887b0aa1d6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
> +++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
> @@ -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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] drm/amdgpu: Add MB_REQ_MSG_READY_TO_RESET response when VF get FLR notification.
  2021-08-12  8:28 ` Zhou, Peng Ju
@ 2021-08-12  8:34   ` Deng, Emily
  0 siblings, 0 replies; 3+ messages in thread
From: Deng, Emily @ 2021-08-12  8:34 UTC (permalink / raw)
  To: Zhou, Peng Ju, Zhou, Peng Ju, amd-gfx; +Cc: Zhao, Jiange

[-- Attachment #1: Type: text/plain, Size: 2494 bytes --]

Reviewed-by: Emily.Deng <Emily.Deng@amd.com>

>-----Original Message-----
>From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Zhou,
>Peng Ju
>Sent: Thursday, August 12, 2021 4:28 PM
>To: Zhou, Peng Ju <PengJu.Zhou@amd.com>; amd-gfx@lists.freedesktop.org
>Cc: Zhao, Jiange <Jiange.Zhao@amd.com>
>Subject: RE: [PATCH] drm/amdgpu: Add MB_REQ_MSG_READY_TO_RESET
>response when VF get FLR notification.
>
>[AMD Official Use Only]
>
>ping
>
>> -----Original Message-----
>> From: Peng Ju Zhou <PengJu.Zhou@amd.com>
>> Sent: Monday, August 9, 2021 5:37 PM
>> To: amd-gfx@lists.freedesktop.org
>> Cc: Zhao, Jiange <Jiange.Zhao@amd.com>; Zhou, Peng Ju
>> <PengJu.Zhou@amd.com>
>> Subject: [PATCH] drm/amdgpu: Add MB_REQ_MSG_READY_TO_RESET
>response
>> when VF get FLR notification.
>>
>> From: Jiange Zhao <Jiange.Zhao@amd.com>
>>
>> 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>
>> ---
>>  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(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
>> b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
>> index b48e68f46a5c..a35e6d87e537 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
>> @@ -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;
>> diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
>> b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
>> index 9f5808616174..73887b0aa1d6 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.h
>> @@ -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

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 16729 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-12  8:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09  9:36 [PATCH] drm/amdgpu: Add MB_REQ_MSG_READY_TO_RESET response when VF get FLR notification Peng Ju Zhou
2021-08-12  8:28 ` Zhou, Peng Ju
2021-08-12  8:34   ` Deng, Emily

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.