From: sashiko-bot@kernel.org
To: "Shahyan Soltani" <shahyan.soltani@amd.com>,
amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3] drm/amdgpu: clear root PT after setting vm->is_npa = true
Date: Thu, 19 Nov 2026 18:55:56 +0000 [thread overview]
Message-ID: <sashiko-outbox-223809@kernel.org> (raw)
In-Reply-To: <20261119184620.1090706-1-shahyan.soltani@amd.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/amdgpu: missing Fixes trailer on amdgpu_vm_make_npa() bug
fix
--
commit 40ad838159433460dcfd2d24788c88778750f58b
Author: Shahyan Soltani <shahyan.soltani@amd.com>
> drm/amdgpu: clear root PT after setting vm->is_npa = true
>
> Previously, the root PT was never cleared after setting vm->is_npa =
> true within amdgpu_vm_make_npa(). This resulted in the flag
> adev->gmc.no_retry_flags to never be applied for the NPA VMs.
>
> Call amdgpu_vm_pt_clear() after vm->is_npa = true is set and the bo has
> been pinned/validated. This allows the root PT of the NPA VM to be
> cleared with the correct value.
>
> If the pinning or reservation of the bo failed, the vm->is_npa flag will
> no longer remain as true. This is to avoid conditionals outside of
> amdgpu_vm_make_npa() that depend on the vm->is_npa flag to determine if
> the VM is a correctly initialized NPA VM.
>
> Warn if the VM already has mappings, since clearing the root PT will
> break existing mappings.
>
> Remove the redundant second setting of vm->is_npa = true.
>
> v2:
> - Add the WARN_ON sanity check regarding an empty VM (Felix)
> - Change the return handling to only set vm->is_npa = true upon a
> successful pin (Felix)
> - Add the heavy weight TLB flush after the root PT clear (Philip)
>
> v3:
> - Remove TLB flush (Felix)
> - Move WARN_ON sanity check to start to return early (Christian)
> - Reserve fence slots for amdgpu_vm_pt_clear() and amdgpu_bo_pin()
> by replacing amdgpu_bo_reserve with amdgpu_vm_lock_pd()
> (Christian)
> - Use goto error handling rather than calling return when applicable
>
> Suggested-by: Christian König <christian.koenig@amd.com>
> Signed-off-by: Shahyan Soltani <shahyan.soltani@amd.com>
[Severity: Low]
This fixes a bug in amdgpu_vm_make_npa() where the root page directory
was not cleared after setting vm->is_npa = true and vm->is_npa was set
before reserving and pinning vm->root.bo. Should this include:
Fixes: e05a54573df7 ("drm/amdgpu: Pin page tables in NPA VMs")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119184620.1090706-1-shahyan.soltani@amd.com?part=1
prev parent reply other threads:[~2026-11-19 18:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-19 18:46 [PATCH v3] drm/amdgpu: clear root PT after setting vm->is_npa = true Shahyan Soltani
2026-11-19 18:55 ` sashiko-bot [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=sashiko-outbox-223809@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=amd-gfx@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shahyan.soltani@amd.com \
/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