Skip to content

Commit

Permalink
drm/amdgpu: skip RAS error injection in SRIOV
Browse files Browse the repository at this point in the history
Injection on guest is not allowed.

v2: return directly in SRIOV environment.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Tao Zhou authored and Alex Deucher committed Dec 15, 2022
1 parent 6a822b7 commit 248c963
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,10 @@ int amdgpu_ras_error_inject(struct amdgpu_device *adev,
info->head.block,
info->head.sub_block_index);

/* inject on guest isn't allowed, return success directly */
if (amdgpu_sriov_vf(adev))
return 0;

if (!obj)
return -EINVAL;

Expand Down

0 comments on commit 248c963

Please sign in to comment.