Commit 4e9597f
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 <[email protected]>
Signed-off-by: Donet Tom <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 074fe39)1 parent 28922a4 commit 4e9597f
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2974 | 2974 | | |
2975 | 2975 | | |
2976 | 2976 | | |
2977 | | - | |
2978 | | - | |
2979 | 2977 | | |
2980 | | - | |
| 2978 | + | |
2981 | 2979 | | |
2982 | 2980 | | |
2983 | 2981 | | |
2984 | 2982 | | |
| 2983 | + | |
| 2984 | + | |
2985 | 2985 | | |
2986 | 2986 | | |
2987 | 2987 | | |
| |||
0 commit comments