[PATCH 1/2] drm/amdgpu: mask out invalid PTE address bit
Philip Yang
Philip.Yang at amd.com
Fri Sep 17 00:50:36 UTC 2021
Before adding the PTE flags, explicitly mask out invalid address bits.
Signed-off-by: Philip Yang <Philip.Yang at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index a1ddf74bbdba..b40c15c9fc81 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1445,6 +1445,8 @@ static void amdgpu_vm_update_flags(struct amdgpu_vm_update_params *params,
uint64_t flags)
{
+ addr &= 0x0000FFFFFFFFF000UL;
+
if (level != AMDGPU_VM_PTB) {
flags |= AMDGPU_PDE_PTE;
amdgpu_gmc_get_vm_pde(params->adev, level, &addr, &flags);
--
2.17.1
More information about the amd-gfx
mailing list