From: Philip Yang <Philip.Yang@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Philip Yang <Philip.Yang@amd.com>
Subject: [PATCH 1/2] drm/amdgpu: mask out invalid PTE address bit
Date: Thu, 16 Sep 2021 20:50:36 -0400 [thread overview]
Message-ID: <20210917005037.18526-1-Philip.Yang@amd.com> (raw)
Before adding the PTE flags, explicitly mask out invalid address bits.
Signed-off-by: Philip Yang <Philip.Yang@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
next reply other threads:[~2021-09-17 0:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 0:50 Philip Yang [this message]
2021-09-17 0:50 ` [PATCH 2/2] drm/amdkfd: fix dma mapping leaking warning Philip Yang
2021-09-17 6:23 ` [PATCH 1/2] drm/amdgpu: mask out invalid PTE address bit Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210917005037.18526-1-Philip.Yang@amd.com \
--to=philip.yang@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox