OSDN Git Service

drm/amdgpu: Initialize SPM_VMID with 0xf (v2)
authorJacob He <jacob.he@amd.com>
Thu, 27 Feb 2020 13:17:40 +0000 (21:17 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 28 Feb 2020 21:59:21 +0000 (16:59 -0500)
commit460c484f2411b1f3d291a3237d1bab7327448f01
tree82348223160cababc8594779a50d9a1fbd1534dd
parent89510a2737ae6515dcc5e6cbd3cf588753d4fa17
drm/amdgpu: Initialize SPM_VMID with 0xf (v2)

SPM_VMID is a global resource, SPM access the video memory according to
SPM_VMID. The initial valude of SPM_VMID is 0 which is used by kernel.
That means UMD can overwrite the memory of VMID0 by enabling SPM, that
is really dangerous.

Initialize SPM_VMID with 0xf, it messes up other user mode process at
most.

v2: squash in indentation fix

Signed-off-by: Jacob He <jacob.he@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.h
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c