xe_device_asid_to_vm(9)
π xe_device_asid_to_vm(9) π
okay so bestie, welcome to the Kernel API Manual β this one is xe_device_asid_to_vm, and it lives in the 9 section (that's the kernel-functions girlies, iykyk). it's short, it's sweet, and it does exactly one thing. let's get into it β¨
πΈ NAME πΈ
xe_device_asid_to_vm β Find VM from ASID π
like, that's the whole vibe. ASID in, VM out. no cap.
π¦ SYNOPSIS π¦
struct xe_vm * xe_device_asid_to_vm (struct xe_device *xe , u32 asid );
look at her. one function, two arguments, returns a pointer. clean, minimal, iconic. π
π ARGUMENTS π
xeβ thexe_device. yes literally. it's the xe device. she's the main character of the whole file and you're just passing her through π«Άasidβ the Address space ID, typed as au32. this is the little number you're handing over so the function knows which VM you're looking for π
β¨ DESCRIPTION β¨
okay so here's what she does: she finds a VM from an ASID β and then, and this is the important part bestie, she takes a reference to that VM which the caller must drop. π
read that again. the caller must drop it. that reference is yours now. it's your responsibility. it's your child. if you don't drop it, that's a leak and that's not slay of you. ngl, this is the kind of thing that comes back to haunt you at 3am. π
and β reclaim safe. that's it, that's the note. she's reclaim safe fr fr. π§
π₯ RETURN π₯
- VM on success β yay!! you got her π
ERR_PTRon failure β the classic kernel sad-girl return value. check it withIS_ERR()before you go dereferencing anything, please, i'm begging π
π SEE ALSO π
the whole friend group, in order, no one left out:
- Kernel file
./drivers/gpu/drm/xe/xe_device.c xe_file_get(9)xe_file_put(9)xe_is_xe_file(9)xe_device_is_admin_only(9)xe_device_create(9)xe_device_init_early(9)xe_device_probe_early(9)xe_device_wmb(9)xe_device_is_l2_flush_optimized(9)xe_device_td_flush(9)xe_device_assert_mem_access(9)Xe Device Wedging(9)xe_device_set_wedged_method(9)xe_device_declare_wedged(9)xe_device_validate_wedged_mode(9)xe_wedged_mode_to_string(9)
that's the whole group chat tagged in the post. go read them, they're all lowkey serving ππ
quick vibe check reminder: grab the VM, drop the reference, check for ERR_PTR. that's the whole assignment. periodt. π
and that's the page, bestie!! this one comes to you from the source tree at ./drivers/gpu/drm/xe, dated October 2026 β so happy reading, and may all your references be dropped on time ππππ¦
π¦ 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