intel_guc_al..._and_map_vma(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– intel_guc_al..._and_map_vma(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” yes we're reading kernel docs together, this is our bonding time now 🫢


✨ NAME ✨

intel_guc_allocate_and_map_vma β€” it allocates and maps a VMA for GuC usage. Two jobs, one function, main character energy fr fr πŸ‘‘


🌸 SYNOPSIS 🌸

int intel_guc_allocate_and_map_vma (struct intel_guc *guc , u32 size ,
       struct i915_vma **out_vma , void **out_vaddr );

like, look at her. four arguments, one int coming back. iconic πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • guc β€” the guc. that's it, that's the whole description, and honestly? she said what she said 😭 (it's the struct intel_guc * you're working with, iykyk)
  • size β€” size of area to allocate β€” and listen, that's both virtual space and memory, so don't be out here thinking it's just one of them 🧚
  • out_vma β€” return variable for the allocated vma pointer. yes it's an out-param, yes you gotta pass it in, no you don't get to skip it πŸ’€
  • out_vaddr β€” return variable for the obj mapping. also an out-param. also mandatory. we love a duo 🌈

πŸ¦‹ DESCRIPTION πŸ¦‹

so the way that this works is β€” this wrapper calls intel_guc_allocate_vma and then maps the allocated object with I915_MAP_WB.

that's it. that's the whole vibe. allocate, then map, with I915_MAP_WB specifically, no cap 🎯 it's literally just the convenience wrapper doing the two-step for you so you don't have to ✨


⭐ RETURN ⭐

  • 0 if successful πŸŽ‰
  • a negative errno code otherwise 😭

so like, check your return value. always. be responsible bestie πŸ™ˆ


πŸ’œ SEE ALSO πŸ’œ

go read them. all of them. this is your homework now πŸ“šπŸ’…


tiny reminder bestie: everything above is exactly what the page says β€” i'm just here to make it cute, not to invent new behaviour πŸ’–

and that's a wrap, bb! πŸ“ this gem lives in ./drivers/gpu/drm/i915/gt/uc and it's dated October 2026, so go forth, allocate responsibly, and slay πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from