Skip to contentSkip to conversation

drm/amdgpu: Add ret in ras_reset_error_count on VF

PATCH New Ellen Pan 1 participant 1 message Mar 31, 2025

Subsystems (2)
lore
Share & tools
lore

Ellen Pan

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Add ret in ras_reset_error_count 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 RAS register violations on MI350.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +3 -0
index ebf1f63d0442..f8cf9621097f 100644
@@ -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) ||
Signature · 1 line
2.34.1