On 6/16/2026 10:14 AM, Huang, Honglei wrote:


On 6/15/2026 7:21 PM, Christian König wrote:


On 6/12/26 17:07, Huang, Honglei wrote:


On 6/12/2026 8:21 PM, Christian König wrote:
...
On the SVM and BO overlap issue: if planning to mirror xe is acceptable?

I'm not sure yet but I don't think so.

We have a mixture of engines which can do page faults (3D, SDMA) and engines which can't (multimedia).

We most likely will need a way to completely separate the mapping from each other.

Maybe lower address range for SVM mappings and higher one for BO mappings? But IDK if that will be sufficient for ROCm.


Yeah, I agreed with you, and it seems like xe use a place holder in bo tree to avoid the BO and SVM overlap.

I have remove the previous overlap check, cause it is a defensive check so zero impact on functions. Will use the check method you raised when it is done in amdgpu vm.

Regards,
Honglei


Hi Christian,

thanks again for the thorough review. I fixed the code locally, and the
series is ready and addresses comments from the last round.

1.  amdgpu_svm.h: dropped the AMDGPU_SVM_KMEM_CACHE_* macros; SVM ranges use
    plain kzalloc()/kfree().

2.  amdgpu_svm.h: dropped the flush_tlb callback; amdgpu_svm_flush_tlb() is
    called directly.

3.  amdgpu_svm_attr.h: added kerneldoc for the interval tree and list.

4.  amdgpu_svm_attr.c: dropped the attr slab cache; uses kzalloc()/kfree().

5. amdgpu_svm_attr.c: squashed the types header into its implementation patch

6.  amdgpu_svm_attr.c: renamed the local "flags" to "unsupported_vm_flags".

7.  amdgpu_svm_attr.c: dropped amdgpu_svm_attr_validate_range_vma() from the
fault path; hmm_range_fault() covers it. A lighter sync check is kept only at the
    set/get attr ioctl entry for fix regression.

8. amdgpu_svm_range.h: AMDGPU_SVM_RANGE_DEBUG removed, replaced by a tracepoint.

9.  amdgpu_svm_range.h: dropped the UNMAP_WORK macro.

10. amdgpu_svm_range.c: the fast range valid check is now lock free.

11. amdgpu_svm_range.c: zap_ptes always drains the fence regardless of the
    update return value.

12. per IP PTE flags: moved the switch out of the SVM core into
    gmc_v9_0.c / gmc_v12_0.c behind a new gmc_funcs->get_svm_pte_flags()
    callback.

13. eviction_lock: drm_gpusvm framwork's limitation blocks using the eviction_lock
        Kept as is.

14. SVM/BO overlap: dropped the scan-based amdgpu_svm_attr_check_vm_bo() helper.

15. This series has been rebased on top of the amdgpu vm fix.


Please let me know if there are any remaining review comments. And the follow up features xnack-off support, multi GPU, all build directly on this code, and they are much easier to develop incrementally once there is a stable baseline to build on rather than a moving out of tree base. So please point out anything else you'd like addressed.

Regards,
Honglei


Regards,
Christian.


And maybe need some modificaitons in amdgpu vm, may I know the next step/design?

Regards,
Honglei





Reply via email to