Skip to contentSkip to conversation

drm/amd/ras: skip RAS TA firmware reload on resume for SR-IOV VFs

PATCH In review Chi Hong 4 participants 6 messages Sep 28 – Oct 8

Subsystems (2)
lore
Share & tools
lore

Chi Hong

author
#0 lore raw

PATCH 1/1 drm/amd/ras: skip RAS TA firmware reload on resume for SR-IOV VFs

SR-IOV VFs use amdgpu_virt_ras_hw_init() which skips ras_core_hw_init(), leaving fw_gpu_mem unallocated. ras_psp_reload_firmwares() then hits the NULL buffer and returns -ENOMEM (-12) for every VF on resume, aborting ip_resume_phase2 before amdgpu_fence_driver_hw_init() runs. The next hibernate double-puts IRQ refcounts causing a WARN storm.

Skip the reload for VFs — there is nothing local to reload. The post-reset path (amdgpu_ras_mgr_resume_after_reset) is unaffected.

Fixes 5e5be56a5b76 ("drm/amdgpu/ras: reload RAS TA from ras mgr resume")
---
 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +3 -0
index a02167397ce2..5bac792554f5 100644
@@ -529,6 +529,9 @@ static int amdgpu_ras_mgr_resume(struct amdgpu_ip_block *ip_block)
 	if (!ras_mgr->ras_is_ready)
 		return 0;
 
+	if (amdgpu_sriov_vf(adev))
+		return 0;
+
 	ret = ras_psp_reload_firmwares(ras_mgr->ras_core, 0);
 	if (ret)
 		RAS_DEV_ERR(adev,
Signature · 1 line
2.43.0
author
#1 lore raw

AMD General

Ping

-----Original Message-----
From: Chi Hong <[email protected]>
Sent: Monday, September 28, 2026 2:12 PM
To: [email protected]
Cc: Hong, Chi <[email protected]>
Subject: [PATCH] drm/amd/ras: skip RAS TA firmware reload on resume for SR-IOV VFs

SR-IOV VFs use amdgpu_virt_ras_hw_init() which skips ras_core_hw_init(), leaving fw_gpu_mem unallocated. ras_psp_reload_firmwares() then hits the NULL buffer and returns -ENOMEM (-12) for every VF on resume, aborting ip_resume_phase2 before amdgpu_fence_driver_hw_init() runs. The next hibernate double-puts IRQ refcounts causing a WARN storm.

Skip the reload for VFs - there is nothing local to reload. The post-reset path (amdgpu_ras_mgr_resume_after_reset) is unaffected.

Fixes 5e5be56a5b76 ("drm/amdgpu/ras: reload RAS TA from ras mgr resume")
---
 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +3 -0
index a02167397ce2..5bac792554f5 100644
@@ -529,6 +529,9 @@ static int amdgpu_ras_mgr_resume(struct amdgpu_ip_block *ip_block)
        if (!ras_mgr->ras_is_ready)
                return 0;
 
+       if (amdgpu_sriov_vf(adev))
+               return 0;
+
        ret = ras_psp_reload_firmwares(ras_mgr->ras_core, 0);
        if (ret)
                RAS_DEV_ERR(adev,

--
2.43.0

#2 lore raw

AMD General

Hi @Lazar, Lijo,

Could you please help to review the patch Chi provided? You can contact Chi directly if you have any questions, thanks.

Best Regards,
Celine Zhang
-----Original Message-----
From: Hong, Chi <[email protected]>
Sent: Tuesday, September 29, 2026 3:25 PM
To: Hong, Chi <[email protected]>; [email protected]
Cc: Lazar, Lijo <[email protected]>; Zhang, Hawking <[email protected]>; Zhang, Tiantian (Celine) <[email protected]>
Subject: RE: [PATCH] drm/amd/ras: skip RAS TA firmware reload on resume for SR-IOV VFs

AMD General

Ping

-----Original Message-----
From: Chi Hong <[email protected]>
Sent: Monday, September 28, 2026 2:12 PM
To: [email protected]
Cc: Hong, Chi <[email protected]>
Subject: [PATCH] drm/amd/ras: skip RAS TA firmware reload on resume for SR-IOV VFs

SR-IOV VFs use amdgpu_virt_ras_hw_init() which skips ras_core_hw_init(), leaving fw_gpu_mem unallocated. ras_psp_reload_firmwares() then hits the NULL buffer and returns -ENOMEM (-12) for every VF on resume, aborting ip_resume_phase2 before amdgpu_fence_driver_hw_init() runs. The next hibernate double-puts IRQ refcounts causing a WARN storm.

Skip the reload for VFs - there is nothing local to reload. The post-reset path (amdgpu_ras_mgr_resume_after_reset) is unaffected.

Fixes 5e5be56a5b76 ("drm/amdgpu/ras: reload RAS TA from ras mgr resume")
---
 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +3 -0
index a02167397ce2..5bac792554f5 100644
@@ -529,6 +529,9 @@ static int amdgpu_ras_mgr_resume(struct amdgpu_ip_block *ip_block)
        if (!ras_mgr->ras_is_ready)
                return 0;
 
+       if (amdgpu_sriov_vf(adev))
+               return 0;
+
        ret = ras_psp_reload_firmwares(ras_mgr->ras_core, 0);
        if (ret)
                RAS_DEV_ERR(adev,

--
2.43.0

#3 lore raw
In reply to Hong, Chi
cc Tao/Thomas to take a look.

Thanks,
Lijo

Quoted 38 lines · Chi

AMD General

Ping

-----Original Message-----
From: Chi Hong <[email protected]>
Sent: Monday, September 28, 2026 2:12 PM
To: [email protected]
Cc: Hong, Chi <[email protected]>
Subject: [PATCH] drm/amd/ras: skip RAS TA firmware reload on resume for SR-IOV VFs

SR-IOV VFs use amdgpu_virt_ras_hw_init() which skips ras_core_hw_init(), leaving fw_gpu_mem unallocated. ras_psp_reload_firmwares() then hits the NULL buffer and returns -ENOMEM (-12) for every VF on resume, aborting ip_resume_phase2 before amdgpu_fence_driver_hw_init() runs. The next hibernate double-puts IRQ refcounts causing a WARN storm.

Skip the reload for VFs - there is nothing local to reload. The post-reset path (amdgpu_ras_mgr_resume_after_reset) is unaffected.

Fixes 5e5be56a5b76 ("drm/amdgpu/ras: reload RAS TA from ras mgr resume")
---
  drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +3 -1
index a02167397ce2..5bac792554f5 100644
@@ -529,6 +529,9 @@ static int amdgpu_ras_mgr_resume(struct amdgpu_ip_block *ip_block)
         if (!ras_mgr->ras_is_ready)
                 return 0;
 
+       if (amdgpu_sriov_vf(adev))
+               return 0;
+
         ret = ras_psp_reload_firmwares(ras_mgr->ras_core, 0);
         if (ret)
                 RAS_DEV_ERR(adev,
--

2.43.0

author
#4 lore raw

AMD General

Hi

@Chai, Thomas@Zhou1, Tao. Please take a look at this patch.

Thanks,
Chi

-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Wednesday, September 30, 2026 7:26 PM
To: Hong, Chi <[email protected]>; [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhang, Tiantian (Celine) <[email protected]>; Zhou1, Tao <[email protected]>; Chai, Thomas <[email protected]>
Subject: Re: [PATCH] drm/amd/ras: skip RAS TA firmware reload on resume for SR-IOV VFs

cc Tao/Thomas to take a look.

Thanks,
Lijo

Quoted 38 lines · Chi

AMD General

Ping

-----Original Message-----
From: Chi Hong <[email protected]>
Sent: Monday, September 28, 2026 2:12 PM
To: [email protected]
Cc: Hong, Chi <[email protected]>
Subject: [PATCH] drm/amd/ras: skip RAS TA firmware reload on resume for SR-IOV VFs

SR-IOV VFs use amdgpu_virt_ras_hw_init() which skips ras_core_hw_init(), leaving fw_gpu_mem unallocated. ras_psp_reload_firmwares() then hits the NULL buffer and returns -ENOMEM (-12) for every VF on resume, aborting ip_resume_phase2 before amdgpu_fence_driver_hw_init() runs. The next hibernate double-puts IRQ refcounts causing a WARN storm.

Skip the reload for VFs - there is nothing local to reload. The post-reset path (amdgpu_ras_mgr_resume_after_reset) is unaffected.

Fixes 5e5be56a5b76 ("drm/amdgpu/ras: reload RAS TA from ras mgr resume")
---
  drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +3 -1
index a02167397ce2..5bac792554f5 100644
@@ -529,6 +529,9 @@ static int amdgpu_ras_mgr_resume(struct amdgpu_ip_block *ip_block)
         if (!ras_mgr->ras_is_ready)
                 return 0;
 
+       if (amdgpu_sriov_vf(adev))
+               return 0;
+
         ret = ras_psp_reload_firmwares(ras_mgr->ras_core, 0);
         if (ret)
                 RAS_DEV_ERR(adev,
--

2.43.0

Reviewed-by
#5 lore raw

AMD General

Best Regards,
Thomas
-----Original Message-----
From: Hong, Chi <[email protected]>
Sent: Thursday, October 8, 2026 10:01 AM
To: Lazar, Lijo <[email protected]>; [email protected]; Zhou1, Tao <[email protected]>; Chai, Thomas <[email protected]>
Cc: Zhang, Hawking <[email protected]>; Zhang, Tiantian (Celine) <[email protected]>
Subject: RE: [PATCH] drm/amd/ras: skip RAS TA firmware reload on resume for SR-IOV VFs

AMD General

Hi

@Chai, Thomas@Zhou1, Tao. Please take a look at this patch.

Thanks,
Chi

-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Wednesday, September 30, 2026 7:26 PM
To: Hong, Chi <[email protected]>; [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhang, Tiantian (Celine) <[email protected]>; Zhou1, Tao <[email protected]>; Chai, Thomas <[email protected]>
Subject: Re: [PATCH] drm/amd/ras: skip RAS TA firmware reload on resume for SR-IOV VFs

cc Tao/Thomas to take a look.

Thanks,
Lijo

Quoted 38 lines · Chi

AMD General

Ping

-----Original Message-----
From: Chi Hong <[email protected]>
Sent: Monday, September 28, 2026 2:12 PM
To: [email protected]
Cc: Hong, Chi <[email protected]>
Subject: [PATCH] drm/amd/ras: skip RAS TA firmware reload on resume for SR-IOV VFs

SR-IOV VFs use amdgpu_virt_ras_hw_init() which skips ras_core_hw_init(), leaving fw_gpu_mem unallocated. ras_psp_reload_firmwares() then hits the NULL buffer and returns -ENOMEM (-12) for every VF on resume, aborting ip_resume_phase2 before amdgpu_fence_driver_hw_init() runs. The next hibernate double-puts IRQ refcounts causing a WARN storm.

Skip the reload for VFs - there is nothing local to reload. The post-reset path (amdgpu_ras_mgr_resume_after_reset) is unaffected.

Fixes 5e5be56a5b76 ("drm/amdgpu/ras: reload RAS TA from ras mgr resume")
---
  drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +3 -1
index a02167397ce2..5bac792554f5 100644
@@ -529,6 +529,9 @@ static int amdgpu_ras_mgr_resume(struct amdgpu_ip_block *ip_block)
         if (!ras_mgr->ras_is_ready)
                 return 0;
 
+       if (amdgpu_sriov_vf(adev))
+               return 0;
+
         ret = ras_psp_reload_firmwares(ras_mgr->ras_core, 0);
         if (ret)
                 RAS_DEV_ERR(adev,
--

2.43.0