alloc_iova(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… alloc_iova β€” the Kernel API Manual tea β˜•βœ¨

okay bestie, welcome to the alloc_iova(9) page, brought to you by the Kernel API Manual, and honestly? it's giving "small function, big responsibilities." let's get into it 🫢


✨ NAME ✨

alloc_iova β€” literally just allocates an iova. that's the whole vibe. no cap. πŸŽ€


🌸 SYNOPSIS 🌸

struct iova * alloc_iova (struct iova_domain *iovad , unsigned long size
, unsigned long limit_pfn , bool size_aligned );

like, copy that exactly, bestie, don't freestyle it πŸ’€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • iovad β€” the iova domain in question. yes, that one. the domain we're doing all this in πŸ’–
  • size β€” how many page frames you wanna allocate. the size. the amount. you get it ✨
  • limit_pfn β€” the max limit address. the ceiling. the "don't go past this" line πŸ”₯
  • size_aligned β€” set this if you need a size_aligned address range, iykyk

and here's the lore, bestie πŸ‘‘ β€” this function allocates an iova in the range iovad->start_pfn to limit_pfn, searching top-down from limit_pfn to iovad->start_pfn. top-down, not bottom-up, don't get it twisted πŸ™ˆ

and if the size_aligned flag is set, then the allocated address iova->pfn_lo will be naturally aligned on roundup_power_of_two(size). naturally aligned!! we love a tidy address 🌈⭐


πŸ’œ SEE ALSO πŸ’œ

go read them, they're all in the group chat too, fr fr πŸ’…


lowkey reminder: size_aligned only does its alignment thing when you actually set it, so set it if you need it, bestie. the flag isn't decorative πŸŽ€

and that's the page!! sign-off time: this one's from ./drivers/iommu, dated October 2026 β€” put it in your calendar, screenshot it, whatever πŸ˜­πŸ’– mwah, slay, go allocate responsibly πŸ§šβ€β™€οΈπŸ’…

πŸ“¦ where this page comes from