drm/amdgpu: Move read of snoop register from guest to host
Subsystems (2)
PATCH 1/1 drm/amdgpu: Move read of snoop register from guest to host
From: Masha Grinman <[email protected]>
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 guestwq
--- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c +3 -0
@@ -221,6 +221,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 */
Signature · 1 line
2.34.1
[Public]
One minor comment, with that fixed.
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Masha Grinman
Sent: Monday, April 7, 2025 1:14 PM
To: [email protected]
Cc: Grinman, Masha <[email protected]>; Grinman, Masha <[email protected]>
Subject: [PATCH] drm/amdgpu: Move read of snoop register from guest to host
From: Masha Grinman <[email protected]>
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 guestwq
[HK]: guestwq <-- is this a typo?
--- drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c +3 -0
@@ -221,6 +221,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 */
--
2.34.1