Commit 8ef4e996 authored by Masha Grinman's avatar Masha Grinman Committed by Alex Deucher
Browse files

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: default avatarMasha Grinman <Masha.Grinman@amd.com>
Reviewed-by: default avatarHarish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2aabd44a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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 */