Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: OR init_pte_flags into invalid leaf PTE updates

Invalid leaf clears that only set AMDGPU_PTE_EXECUTABLE match the old
GMC9 fault-priority workaround but omit adev->gmc.init_pte_flags.
On GFX12 that includes AMDGPU_PTE_IS_PTE; without it, some cleared
PTEs can fault as no-retry and bypass the SVM/XNACK handler when a
VA is reused after a BO unmap.

Apply init_pte_flags in amdgpu_vm_pte_update_flags() alongside
EXECUTABLE so range-driven clears (e.g. amdgpu_vm_clear_freed) match
amdgpu_vm_pt_clear() for leaf templates.

Signed-off-by: Siwei He <siwei.he@amd.com>
Reviewed-by: Philip Yang <philip.yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 9d47b2c36b9a6c6b844c33cab407a5d7ad102234)

authored by

Siwei He and committed by
Alex Deucher
778bf584 0e48f27d

+5 -2
+5 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
··· 693 693 !(flags & AMDGPU_PTE_VALID) && 694 694 !(flags & AMDGPU_PTE_PRT_FLAG(params->adev))) { 695 695 696 - /* Workaround for fault priority problem on GMC9 */ 697 - flags |= AMDGPU_PTE_EXECUTABLE; 696 + /* Workaround for fault priority problem on GMC9 and GFX12, 697 + * EXECUTABLE for GMC9 fault priority and init_pte_flags 698 + * (e.g. AMDGPU_PTE_IS_PTE on GFX12) 699 + */ 700 + flags |= AMDGPU_PTE_EXECUTABLE | adev->gmc.init_pte_flags; 698 701 } 699 702 700 703 /*