Patch "drm/amd/amdgpu: add error handling to amdgpu_virt_read_pf2vf_data" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/amd/amdgpu: add error handling to amdgpu_virt_read_pf2vf_data

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-amd-amdgpu-add-error-handling-to-amdgpu_virt_rea.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 46462e09f4651a5b5c3b0e2037e091a3d613f57a
Author: Jingwen Chen <Jingwen.Chen2@xxxxxxx>
Date:   Tue Jan 19 16:54:50 2021 +0800

    drm/amd/amdgpu: add error handling to amdgpu_virt_read_pf2vf_data
    
    [ Upstream commit 64dcf2f01d59cf9fad19b1a387bd39736a8f4d69 ]
    
    [Why]
    when vram lost happened in guest, try to write vram can lead to
    kernel stuck.
    
    [How]
    When the readback data is invalid, don't do write work, directly
    reschedule a new work.
    
    Signed-off-by: Jingwen Chen <Jingwen.Chen2@xxxxxxx>
    Reviewed-by: Monk Liu<monk.liu@xxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index d0aea5e39531..e7678ba8fdcf 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
@@ -558,10 +558,14 @@ static int amdgpu_virt_write_vf2pf_data(struct amdgpu_device *adev)
 void amdgpu_virt_update_vf2pf_work_item(struct work_struct *work)
 {
 	struct amdgpu_device *adev = container_of(work, struct amdgpu_device, virt.vf2pf_work.work);
+	int ret;
 
-	amdgpu_virt_read_pf2vf_data(adev);
+	ret = amdgpu_virt_read_pf2vf_data(adev);
+	if (ret)
+		goto out;
 	amdgpu_virt_write_vf2pf_data(adev);
 
+out:
 	schedule_delayed_work(&(adev->virt.vf2pf_work), adev->virt.vf2pf_update_interval_ms);
 }
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux