aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
diff options
context:
space:
mode:
authorTao Zhou <[email protected]>2022-12-08 03:51:47 +0000
committerAlex Deucher <[email protected]>2022-12-15 17:18:19 +0000
commit248c9635b8bd9d0c1649031da531d80e850fbdbe (patch)
treed05ad601e566e137273dd9af1558a2d8d0bb6862 /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
parentdrm/amdgpu: add VCN poison consumption handler for SRIOV (diff)
downloadkernel-248c9635b8bd9d0c1649031da531d80e850fbdbe.tar.gz
kernel-248c9635b8bd9d0c1649031da531d80e850fbdbe.zip
drm/amdgpu: skip RAS error injection in SRIOV
Injection on guest is not allowed. v2: return directly in SRIOV environment. Signed-off-by: Tao Zhou <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index ad490c1e2f57..4e450e0b14fa 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -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;