From: sashiko-bot@kernel.org
To: "Bob Zhou" <bobzhou2@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: keep the address of cleared PDEs with translate further
Date: Thu, 26 Nov 2026 10:40:11 +0000 [thread overview]
Message-ID: <sashiko-outbox-235305@kernel.org> (raw)
In-Reply-To: <20261126101946.2651048-1-bobzhou2@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/amdgpu: cleared PDE addr passed as incr in
amdgpu_vm_pt_clear()
--
commit d99a4183771402011e83a09490a1a9e68c1c93f4
Author: Bob Zhou <bobzhou2@amd.com>
drm/amdgpu: keep the address of cleared PDEs with translate further
This commit changes amdgpu_vm_pt_clear_flags() to output both the address and
flags for cleared PDEs/PTEs and passes the address to vm->update_funcs->update()
in amdgpu_vm_pt_clear().
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
> index a6d389c08524f..8f1e0bc7d65ae 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
[ ... ]
> @@ -395,7 +390,7 @@ int amdgpu_vm_pt_clear(struct amdgpu_device *adev, struct amdgpu_vm *vm,
> struct amdgpu_bo *ancestor = &vmbo->bo;
> struct amdgpu_bo *bo = &vmbo->bo;
> unsigned int entries;
> - uint64_t flags;
> + uint64_t value = 0, flags = 0;
> int r, idx;
>
> /* Figure out our place in the hierarchy */
> @@ -430,8 +425,9 @@ int amdgpu_vm_pt_clear(struct amdgpu_device *adev, struct amdgpu_vm *vm,
> if (r)
> goto exit;
>
> - flags = amdgpu_vm_pt_clear_flags(adev, vm, level);
> - r = vm->update_funcs->update(¶ms, vmbo, 0, 0, entries, 0, flags);
> + amdgpu_vm_pt_clear_flags(adev, vm, level, &value, &flags);
> + r = vm->update_funcs->update(¶ms, vmbo, 0, 0, entries, value,
> + flags);
[Severity: High]
Does this pass value as the incr argument of vm->update_funcs->update()
instead of the addr argument?
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_internal.h:amdgpu_vm_update_funcs {
...
int (*update)(struct amdgpu_vm_update_params *p,
struct amdgpu_bo_vm *bo, uint64_t pe, uint64_t addr,
unsigned count, uint32_t incr, uint64_t flags);
...
}
When clearing a PDB0 page directory with translate_further enabled on GMC9,
gmc_v9_0_get_vm_pde() sets bit 12 (0x1000) in value and clears
AMDGPU_PDE_PTE from flags. Passing 0 for addr and value for incr makes
both the CPU and SDMA updaters write (0 + i * 0x1000) | flags to entry i,
so entry 0 still reads as 0 and subsequent entries get incrementing
addresses rather than a constant 0x1000, triggering VM faults on hardware
page table walks.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126101946.2651048-1-bobzhou2@amd.com?part=1
next prev parent reply other threads:[~2026-11-26 10:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 10:19 [PATCH] drm/amdgpu: keep the address of cleared PDEs with translate further Bob Zhou
2026-11-26 10:35 ` Christian König
2026-11-26 10:40 ` sashiko-bot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-11-26 7:32 Bob Zhou
2026-11-26 7:52 ` sashiko-bot
2026-11-26 9:45 ` 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=sashiko-outbox-235305@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bobzhou2@amd.com \
--cc=sashiko-reviews@lists.linux.dev \
/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