* [PATCH] drm/amdgpu: Direct ret in ras_reset_err_cnt on VF
@ 2025-04-03 14:40 Ellen Pan
2025-04-10 20:50 ` Rehman, Ahmad
0 siblings, 1 reply; 2+ messages in thread
From: Ellen Pan @ 2025-04-03 14:40 UTC (permalink / raw)
To: amd-gfx; +Cc: Victor.Skvortsov, Ahmad.Rehman, Shravankumar.Gande, Ellen Pan
With adding sriov_vf check, we directly return EOPNOTSUPP in
ras_reset_error_count as we should not do anything on VF to reset RAS error
count.
This also fixes the issue that loading guest driver causes register
violations.
Signed-off-by: Ellen Pan <yunru.pan@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index ebf1f63d0442..f8cf9621097f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -1498,6 +1498,9 @@ int amdgpu_ras_reset_error_count(struct amdgpu_device *adev,
!amdgpu_ras_get_aca_debug_mode(adev))
return -EOPNOTSUPP;
+ if (amdgpu_sriov_vf(adev))
+ return -EOPNOTSUPP;
+
/* skip ras error reset in gpu reset */
if ((amdgpu_in_reset(adev) || amdgpu_ras_in_recovery(adev)) &&
((smu_funcs && smu_funcs->set_debug_mode) ||
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] drm/amdgpu: Direct ret in ras_reset_err_cnt on VF
2025-04-03 14:40 [PATCH] drm/amdgpu: Direct ret in ras_reset_err_cnt on VF Ellen Pan
@ 2025-04-10 20:50 ` Rehman, Ahmad
0 siblings, 0 replies; 2+ messages in thread
From: Rehman, Ahmad @ 2025-04-10 20:50 UTC (permalink / raw)
To: Pan, Ellen, amd-gfx@lists.freedesktop.org
Cc: Skvortsov, Victor, Gande, Shravan kumar
[AMD Official Use Only - AMD Internal Distribution Only]
Reviewed-by: Ahmad Rehman <Ahmad.Rehman@amd.com>
Thanks,
Ahmad
-----Original Message-----
From: Pan, Ellen <Yunru.Pan@amd.com>
Sent: Thursday, April 3, 2025 10:40 AM
To: amd-gfx@lists.freedesktop.org
Cc: Skvortsov, Victor <Victor.Skvortsov@amd.com>; Rehman, Ahmad <Ahmad.Rehman@amd.com>; Gande, Shravan kumar <Shravankumar.Gande@amd.com>; Pan, Ellen <Yunru.Pan@amd.com>
Subject: [PATCH] drm/amdgpu: Direct ret in ras_reset_err_cnt on VF
With adding sriov_vf check, we directly return EOPNOTSUPP in ras_reset_error_count as we should not do anything on VF to reset RAS error count.
This also fixes the issue that loading guest driver causes register violations.
Signed-off-by: Ellen Pan <yunru.pan@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index ebf1f63d0442..f8cf9621097f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -1498,6 +1498,9 @@ int amdgpu_ras_reset_error_count(struct amdgpu_device *adev,
!amdgpu_ras_get_aca_debug_mode(adev))
return -EOPNOTSUPP;
+ if (amdgpu_sriov_vf(adev))
+ return -EOPNOTSUPP;
+
/* skip ras error reset in gpu reset */
if ((amdgpu_in_reset(adev) || amdgpu_ras_in_recovery(adev)) &&
((smu_funcs && smu_funcs->set_debug_mode) ||
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-10 20:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-03 14:40 [PATCH] drm/amdgpu: Direct ret in ras_reset_err_cnt on VF Ellen Pan
2025-04-10 20:50 ` Rehman, Ahmad
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox