aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
diff options
context:
space:
mode:
authorMasha Grinman <Masha.Grinman@amd.com>2025-04-03 14:08:17 -0500
committerAlex Deucher <alexander.deucher@amd.com>2025-04-11 16:54:02 -0400
commit8ef4e996745b56ad6018e4120acf9ab530b72c2f (patch)
tree5317d49a6a0758378e49e76a087d6de2da4b1f5a /drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
parentdrm/amd: Forbid suspending into non-default suspend states (diff)
downloadlinux-8ef4e996745b56ad6018e4120acf9ab530b72c2f.tar.gz
linux-8ef4e996745b56ad6018e4120acf9ab530b72c2f.zip
drm/amdgpu: Move read of snoop register from guest to host
Guest is reading/writing to snoop register which is a security violation We moved the code to the host driver And also added a validation on the guest side to check if it's guest Signed-off-by: Masha Grinman <Masha.Grinman@amd.com> Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
index 4a43c9ab95a2..76167fadb292 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
@@ -239,6 +239,9 @@ static void mmhub_v1_8_init_snoop_override_regs(struct amdgpu_device *adev)
uint32_t distance = regDAGB1_WRCLI_GPU_SNOOP_OVERRIDE -
regDAGB0_WRCLI_GPU_SNOOP_OVERRIDE;
+ if (amdgpu_sriov_vf(adev))
+ return;
+
inst_mask = adev->aid_mask;
for_each_inst(i, inst_mask) {
for (j = 0; j < 5; j++) { /* DAGB instances */