xe_vm_has_valid_gpu_mapping(9)
π xe_vm_has_valid_gpu_mapping(9) β the Kernel API Manual glow-up β¨
okay so bestie, welcome to section 9 of the Kernel API Manual, and today's main character is xe_vm_has_valid_gpu_mapping β an advisory helper that checks whether a VMA or an SVM range has a valid GPU mapping π«Ά
π SYNOPSIS π
xe_vm_has_valid_gpu_mapping (tile , tile_present , tile_invalidated );
πΈ ARGUMENTS πΈ
- tile β the tile that the GPU mapping belongs to π§
- tile_present β the tile present mask β¨
- tile_invalidated β the tile invalidated mask π
π¦ DESCRIPTION π¦
ok so here's the tea β β those READ_ONCEs are literally in a committed relationship with the WRITE_ONCEs, okay? They pair up with the ones in either the TLB invalidation paths (xe_vm.c, xe_svm.c) or the binding paths (xe_pt.c). periodt. π
but β and this is the important part, ngl, do not skip this β they are not reliable without the notifier lock in userptr or SVM cases π« and they're also not reliable without the BO dma-resv lock in the BO case. like, genuinely not reliable. no cap.
so because of that whole situation, they should only be used in opportunistic cases β for example skipping a page fault fix, or not skipping a TLB invalidation β where it is harmless π. lowkey that's the whole vibe: harmless little peek, not a source of truth. iykyk π
π RETURN π
True if there are valid GPU pages π, False otherwise π.
β SEE ALSO β
Kernel file ./drivers/gpu/drm/xe/xe_vm.h β and then the whole friend group, fr fr:
MAX_FAULTS_SAVED_PER_VM(9)xe_vm_has_scratch(9)gpuvm_to_vm(9)Provide accessors for vma members to facilitate easy change of(9)πto_userptr_vma(9)xe_vm_reactivate_rebind(9)xe_vm_resv(9)xe_vm_assert_held(9)xe_vm_set_validating(9)xe_vm_clear_validating(9)xe_vm_is_validating(9)xe_vm_set_validation_exec(9)xe_vm_validation_exec(9)
π reminder bestie: opportunistic only. these reads are giving "vibes check", not "source of truth" β if you need real reliability, get the right lock first π
xoxo, this page lives in ./drivers/gpu/drm/xe, dropped October 2026, and it's literally signed xe_vm_has_valid_gpu_mapping(9) β slay ππ
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms