From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Philip Yang <Philip.Yang@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/amdgpu: mask out invalid PTE address bit
Date: Fri, 17 Sep 2021 08:23:17 +0200 [thread overview]
Message-ID: <c0b48786-f12d-cc83-63fb-24d321d4241c@gmail.com> (raw)
In-Reply-To: <20210917005037.18526-1-Philip.Yang@amd.com>
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@amd.com>
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);
prev parent reply other threads:[~2021-09-17 6:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-17 0:50 [PATCH 1/2] drm/amdgpu: mask out invalid PTE address bit Philip Yang
2021-09-17 0:50 ` [PATCH 2/2] drm/amdkfd: fix dma mapping leaking warning Philip Yang
2021-09-17 6:23 ` Christian König [this message]
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=c0b48786-f12d-cc83-63fb-24d321d4241c@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=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