All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexander.deucher@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Mukul Joshi <mukul.joshi@amd.com>,
	Alex Sierra <alex.sierra@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>
Subject: [PATCH 6/7] drm/amdkfd: Fix PTE clearing during SVM unmap on GFX 12.1
Date: Wed, 19 Nov 2025 10:05:59 -0500	[thread overview]
Message-ID: <20251119150600.3663611-7-alexander.deucher@amd.com> (raw)
In-Reply-To: <20251119150600.3663611-1-alexander.deucher@amd.com>

From: Mukul Joshi <mukul.joshi@amd.com>

During migration from VRAM to RAM, when PTE is cleared, reset
the PTE to always ensure that PTE.P=1 is set on GFX 12.1. If
PTE.P is not set, it can lead to TF faults.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
index 97c2270f278fd..24a698702da75 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c
@@ -1313,7 +1313,7 @@ svm_range_unmap_from_gpu(struct amdgpu_device *adev, struct amdgpu_vm *vm,
 			 uint64_t start, uint64_t last,
 			 struct dma_fence **fence)
 {
-	uint64_t init_pte_value = 0;
+	uint64_t init_pte_value = adev->gmc.init_pte_flags;
 
 	pr_debug("[0x%llx 0x%llx]\n", start, last);
 
-- 
2.51.1


  parent reply	other threads:[~2025-11-19 15:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-19 15:05 [PATCH 0/7] Add gmc 12.1 support Alex Deucher
2025-11-19 15:05 ` [PATCH 1/7] drm/amdgpu: Add gmc v12_1 support Alex Deucher
2025-11-19 15:05 ` [PATCH 2/7] drm/amdgpu: Add gmc v12_1 gmc callbacks Alex Deucher
2025-11-19 15:05 ` [PATCH 3/7] drm/amdgpu: Add per-ASIC PTE init flag Alex Deucher
2025-11-19 15:05 ` [PATCH 4/7] drm/amdgpu: Always set snoop bit in PDE on GFX 12.1 Alex Deucher
2025-11-19 15:05 ` [PATCH 5/7] drm/amdgpu: Enable PDE.C usage " Alex Deucher
2025-11-19 15:05 ` Alex Deucher [this message]
2025-11-19 15:06 ` [PATCH 7/7] drm/amdgpu: Add gmc v12_1_0 to discovery list Alex Deucher

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=20251119150600.3663611-7-alexander.deucher@amd.com \
    --to=alexander.deucher@amd.com \
    --cc=alex.sierra@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=mukul.joshi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.