intel_guc_allocate_vma(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… intel_guc_allocate_vma(9) πŸ’…

okay so bestie, we're in the Kernel API Manual today and this one is genuinely iconic β€” it's intel_guc_allocate_vma, and it does exactly what it says on the tin: it allocates a GGTT VMA for GuC usage. no cap. πŸŽ€


✨ NAME ✨

intel_guc_allocate_vma β€” Allocate a GGTT VMA for GuC usage 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

struct i915_vma * intel_guc_allocate_vma (struct intel_guc *guc , u32 size );

πŸ’– ARGUMENTS πŸ’–

  • guc β€” the guc. that's it. that's the whole description. she's main character energy and needs no introduction. πŸ‘‘
  • size β€” size of area to allocate β€” and bb, it's both virtual space and memory, not just one of them. both. at once. slay. 🫢

🌈 DESCRIPTION 🌈

so like… this function is a wrapper. a cute little convenience wrapper whose whole job is creating an object for use with the GuC. 🧚

here's the vibe check: in order to actually use an object inside the GuC, that object needs to be pinned lifetime. meaning it's not going anywhere, ever, it's committed. πŸ’€ so what do we do? we allocate both:

  • some backing storage, and
  • a range inside the Global GTT.

two things, one function, we love to see it. ✨

and here's the part you cannot skip β€” we must pin it in the GGTT somewhere other than the range [0, GUC ggtt_pin_bias), because that range is reserved inside GuC. that's GuC's spot. don't touch. πŸ™ˆ it's giving "reserved parking space" and we are not that girl who parks there.


πŸ”₯ RETURN πŸ”₯

an i915_vma if it's successful πŸ’– β€” otherwise it hands you back an ERR_PTR. so like, check that pointer, bestie, fr fr. 😭


🌸 SEE ALSO 🌸

all of these are lowkey required reading, iykyk. πŸ“šβ­


bestie PSA: that [0, GUC ggtt_pin_bias) range is reserved inside GuC, so pinning outside of it isn't a suggestion, it's the whole assignment. πŸ’…

that's the page! brought to you from ./drivers/gpu/drm/i915/gt/uc, dated October 2026, in the Kernel API Manual. mwah, go read the source, ily, bye! πŸ’œπŸ¦‹πŸŽ€

πŸ“¦ where this page comes from