xe_svm_range_find_or_insert(9)
π xe_svm_range_find_or_insert β bestie edition π¦
okay so welcome to the xe_svm_range_find_or_insert(9) page, part of the Kernel API Manual (yes that Kernel API Manual, the one we all fear and love π). This is that GPU SVM range business. Sit down, hydrate, let's go.
β¨ NAME β¨
xe_svm_range_find_or_insert β literally the function that finds or inserts a GPU SVM range π
πΈ SYNOPSIS πΈ
keep it exactly like this, no cap:
struct xe_svm_range * xe_svm_range_find_or_insert (struct xe_vm *vm ,
u64 addr , struct xe_vma *vma , struct drm_gpusvm_ctx *ctx );
π«Ά ARGUMENTS π«Ά
vmβ anxe_vmpointer. the whole vm situation, iconic.addrβ the address for which the range needs to be found/inserted. this is the address. it's giving "where is it" energy.vmaβ pointer tostruct xe_vmawhich mirrors CPU. like, it's the vma's reflection selfie πctxβ the GPU SVM context. the vibe holder.
π DESCRIPTION π
so what does it even do?? it finds β OR inserts β a newly allocated SVM range, based on the address. that's it. that's the whole thing. find or insert, based on addr. slay. β
π₯ RETURN π₯
- Pointer to the SVM range on success π
ERR_PTRon failure π
(so like, check your pointer bestie, don't just vibe with it blindly.)
π SEE ALSO π
look at this friend group. it's a whole squad:
- Kernel file
./drivers/gpu/drm/xe/xe_svm.c drm_pagemapreference-counting inxe:(9)xe_svm_init(9)xe_svm_close(9)xe_svm_fini(9)xe_svm_range_validate(9)xe_svm_find_vma_start(9)xe_svm_range_needs_migrate_to_vram(9)xe_svm_handle_pagefault(9)xe_svm_has_mapping(9)xe_svm_unmap_address_range(9)xe_svm_bo_evict(9)xe_svm_range_get_pages(9)xe_svm_ranges_zap_ptes_in_range(9)xe_vma_resolve_pagemap(9)xe_svm_alloc_vram(9)xe_pagemap_create(9)xe_pagemap_find_or_create(9)xe_pagemap_shrinker_create(9)xe_pagemap_cache_create(9)xe_drm_pagemap_from_fd(9)xe_svm_flush(9)
ok real talk: they all live in ./drivers/gpu/drm/xe together, it's basically a group chat π§
and that's the page!! mwah π this lil manual came from ./drivers/gpu/drm/xe and it's dated October 2026, so like, from the future?? we love a forward-thinking source. anyway xe_svm_range_find_or_insert(9) out. bye bestie, go find (or insert) your range πβ¨
π¦ 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