xe_vm_find_c...or_vma_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… xe_vm_find_cpu_addr_mirror_vma_range(9)

okay so bestie, welcome to the kernel API manual for xe_vm_find_cpu_addr_mirror_vma_range β€” yes that name is a whole mouthful, no I will not be shortening it, and yes it is iconic. this is a real function in the kernel's 9 section and we're gonna get you fluent in it. πŸŽ€


✨ NAME ✨

xe_vm_find_cpu_addr_mirror_vma_range β€” the glow-up function that extends a VMA range to include adjacent CPU-mirrored VMAs. literally its whole job. periodt. πŸ’…


🌸 SYNOPSIS 🌸

void xe_vm_find_cpu_addr_mirror_vma_range (struct xe_vm *vm , u64 *start
, u64 *end );

like, that's the signature, copy it exactly, don't be weird about it. ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • vm β€” the VM you're searching inside. this is your main character struct, the whole search happens in here. πŸ‘‘
  • start β€” an input/output pointer to the starting address of the range. yeah, in and out β€” it goes in with a value and can come back changed. πŸ”
  • end β€” an input/output pointer to the end address of the range. same deal, it's a two-way street bestie. πŸ”

πŸ’– DESCRIPTION πŸ’–

okay so here's the vibe, and it's actually kind of elegant ngl:

given a range defined by start and range, this function checks the VMAs immediately before and immediately after the range. just the two neighbors, mind you β€” it's not out here scanning the whole world. 🧚

if those neighboring VMAs are CPU-address-mirrored and have default memory attributes, then β€” and this is the slay part β€” the function updates start and range to include them. so the range grows to swallow its cute little neighbors. 🌈

this extended range can then be used for merging or other operations that require a unified VMA. it's giving "prep work" energy and honestly? we respect it. 🫢

⚠️ important caveat bestie: the function does not perform the merge itself β€” it only computes the mergeable boundaries. it's setting the table, not eating the meal. do not come for this function expecting the merge to already be done. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

the source of all this magic lives in the kernel file ./drivers/gpu/drm/xe/xe_vm.c, and here's the full squad of related functions β€” every single one, no gatekeeping:

like, that's the whole friend group. go say hi. iykyk. 🫢✨


πŸŽ€ SIGN-OFF πŸŽ€

and that's the tea! this page ships out of ./drivers/gpu/drm/xe, dated October 2026, and is filed under xe_vm_find_c...or_vma_range(9) β€” yes the header truncates it, no that's not a typo on my end, that's just how it's printed. πŸ’œ

go extend those ranges bestie, you've got this. πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from