Skip to contentSkip to conversation

SWDEV-513979 - Fix for BSOD on Hyper-V host side

PATCH In review Nikola Petrovic 2 participants 2 messages Apr 3, 2025 – Apr 24, 2025

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

PATCH 1/1 SWDEV-513979 - Fix for BSOD on Hyper-V host side

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -3
index a30111d2c3ea..0f337a0bdee8 100644
@@ -5307,11 +5307,12 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,
 	struct amdgpu_hive_info *hive = NULL;
 
 	if (test_bit(AMDGPU_HOST_FLR, &reset_context->flags)) {
+		r = amdgpu_virt_wait_reset(adev);
+		if(r)
+			return r;
 		if (!amdgpu_ras_get_fed_status(adev))
-			amdgpu_virt_ready_to_reset(adev);
-		amdgpu_virt_wait_reset(adev);
+			r = amdgpu_virt_reset_gpu(adev);
 		clear_bit(AMDGPU_HOST_FLR, &reset_context->flags);
-		r = amdgpu_virt_request_full_gpu(adev, true);
 	} else {
 		r = amdgpu_virt_reset_gpu(adev);
 	}
Signature · 1 line
2.43.0
#1 lore raw

On Thu, Apr 3, 2025 at 6:58 AM Nikola Petrovic <[email protected]> wrote:

Please fix the patch title. It should say something like:

drm/amdgpu: fix reset handling with Hyper-V

You also need a patch description describing why the change is needed. And finally, your patch is missing your Signed-off-by.

Alex

Quoted 28 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -4
index a30111d2c3ea..0f337a0bdee8 100644
@@ -5307,11 +5307,12 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,
        struct amdgpu_hive_info *hive = NULL;
 
        if (test_bit(AMDGPU_HOST_FLR, &reset_context->flags)) {
+               r = amdgpu_virt_wait_reset(adev);
+               if(r)
+                       return r;
                if (!amdgpu_ras_get_fed_status(adev))
-                       amdgpu_virt_ready_to_reset(adev);
-               amdgpu_virt_wait_reset(adev);
+                       r = amdgpu_virt_reset_gpu(adev);
                clear_bit(AMDGPU_HOST_FLR, &reset_context->flags);
-               r = amdgpu_virt_request_full_gpu(adev, true);
        } else {
                r = amdgpu_virt_reset_gpu(adev);
        }
--

2.43.0