Commit 3c2a01cb authored by Jack Zhang's avatar Jack Zhang Committed by Alex Deucher

drm/amdgpu/sriov Stop data exchange for wholegpu reset

[Why]
When host trigger a whole gpu reset, guest will keep
waiting till host finish reset. But there's a work
queue in guest exchanging data between vf&pf which need
to access frame buffer. During whole gpu reset, frame
buffer is not accessable, and this causes the call trace.

[How]
After vf get reset notification from pf, stop data exchange.
Signed-off-by: default avatarJingwen Chen <Jingwen.Chen2@amd.com>
Signed-off-by: default avatarJack Zhang <Jack.Zhang1@amd.com>
Reviewed-by: default avatarMonk Liu <monk.liu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 47381540
...@@ -573,6 +573,7 @@ void amdgpu_virt_fini_data_exchange(struct amdgpu_device *adev) ...@@ -573,6 +573,7 @@ void amdgpu_virt_fini_data_exchange(struct amdgpu_device *adev)
DRM_INFO("clean up the vf2pf work item\n"); DRM_INFO("clean up the vf2pf work item\n");
flush_delayed_work(&adev->virt.vf2pf_work); flush_delayed_work(&adev->virt.vf2pf_work);
cancel_delayed_work_sync(&adev->virt.vf2pf_work); cancel_delayed_work_sync(&adev->virt.vf2pf_work);
adev->virt.vf2pf_update_interval_ms = 0;
} }
} }
......
...@@ -255,6 +255,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work) ...@@ -255,6 +255,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct *work)
if (!down_read_trylock(&adev->reset_sem)) if (!down_read_trylock(&adev->reset_sem))
return; return;
amdgpu_virt_fini_data_exchange(adev);
atomic_set(&adev->in_gpu_reset, 1); atomic_set(&adev->in_gpu_reset, 1);
do { do {
......
...@@ -276,6 +276,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work) ...@@ -276,6 +276,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct *work)
if (!down_read_trylock(&adev->reset_sem)) if (!down_read_trylock(&adev->reset_sem))
return; return;
amdgpu_virt_fini_data_exchange(adev);
atomic_set(&adev->in_gpu_reset, 1); atomic_set(&adev->in_gpu_reset, 1);
do { do {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment