Files
linux/drivers/gpu/drm/amd/amdgpu
Donet Tom 4e9597f22a drm/amdgpu: Handle GPU page faults correctly on non-4K page systems
During a GPU page fault, the driver restores the SVM range and then maps it
into the GPU page tables. The current implementation passes a GPU-page-size
(4K-based) PFN to svm_range_restore_pages() to restore the range.

SVM ranges are tracked using system-page-size PFNs. On systems where the
system page size is larger than 4K, using GPU-page-size PFNs to restore the
range causes two problems:

Range lookup fails:
Because the restore function receives PFNs in GPU (4K) units, the SVM
range lookup does not find the existing range. This will result in a
duplicate SVM range being created.

VMA lookup failure:
The restore function also tries to locate the VMA for the faulting address.
It converts the GPU-page-size PFN into an address using the system page
size, which results in an incorrect address on non-4K page-size systems.
As a result, the VMA lookup fails with the message: "address 0xxxx VMA is
removed".

This patch passes the system-page-size PFN to svm_range_restore_pages() so
that the SVM range is restored correctly on non-4K page systems.

Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Donet Tom <donettom@linux.ibm.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 074fe395fb)
2026-03-24 13:55:29 -04:00
..
2024-07-24 17:30:23 -04:00
2026-01-20 17:25:53 -05:00
2025-10-13 14:14:15 -04:00
2024-11-03 01:28:06 -05:00
2024-01-15 18:35:37 -05:00
2024-01-15 18:35:37 -05:00
2026-01-05 16:59:55 -05:00
2024-07-24 17:30:23 -04:00
2024-07-24 17:30:23 -04:00
2026-01-05 16:59:55 -05:00
2026-01-05 16:59:55 -05:00
2026-01-05 16:59:55 -05:00
2023-08-07 16:35:38 -04:00
2026-01-08 11:41:34 -05:00
2026-01-05 16:59:55 -05:00
2023-08-30 15:00:27 -04:00
2025-12-08 13:56:42 -05:00
2026-01-05 16:59:55 -05:00
2026-01-05 16:59:55 -05:00
2026-01-05 16:59:55 -05:00
2026-02-12 15:23:39 -05:00
2026-01-05 16:59:55 -05:00
2026-01-05 16:59:55 -05:00
2026-01-05 16:59:55 -05:00
2026-01-05 16:59:55 -05:00
2026-01-05 16:59:55 -05:00
2026-01-05 16:59:55 -05:00
2026-01-05 16:59:55 -05:00
2025-12-08 13:56:42 -05:00
2023-08-31 16:34:05 -04:00