Am 17.09.21 um 02:50 schrieb Philip Yang:
Before adding the PTE flags, explicitly mask out invalid address bits.
Signed-off-by: Philip Yang <Philip.Yang@xxxxxxx>
Well NAK, we intentionally have a WARN_ON later on to catch errors like
that.
Are some of the flags set in the address here?
Christian.
---
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);