iova_bitmap_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– iova_bitmap_alloc β€” bestie's guide to the IOVA bitmap allocator πŸ’–

okay so this is a page from the Kernel API Manual, section 9 β€” yes, the kernel girlies have their own manpage section and she's serving. Let's get into it πŸŽ€


✨ NAME ✨

iova_bitmap_alloc β€” literally allocates an IOVA bitmap object. that's the whole job. icon behaviour πŸ’…


🌸 SYNOPSIS 🌸

struct iova_bitmap * iova_bitmap_alloc (unsigned long iova , size_t
       length , unsigned long page_size , u64 __user *data );

note the spacing, bestie β€” we keep it exactly how the kernel gave it to us 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • iova β€” start address of the IOVA range. the beginning. the main character's entrance πŸšͺ✨
  • length β€” length of the IOVA range. how far we're going, fr fr πŸ“
  • page_size β€” page size of the IOVA bitmap. it defines what each bit granularity represents β€” so like, every single bit is carrying weight and this decides what it means πŸ‘‘
  • data β€” userspace address of the bitmap. it's u64 __user * and it's pointing at somebody's user memory, so treat it with respect πŸ™ˆ

πŸ’œ DESCRIPTION πŸ’œ

Allocates an IOVA object and initializes all its fields β€” every single one, no crumbs left behind β€” including the first user pages of data. it's giving "full setup, zero shortcuts" energy 🌈


⭐ RETURN ⭐

A pointer to a newly allocated struct iova_bitmap β€” slay, fresh out of the allocator πŸ’–

Or ERR_PTR on error 😭 which, yeah, always check that. that's the vibe check. if you ignore it, you're on your own ngl πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/iommu/iommufd/iova_bitmap.c β€” go read the source, iykyk πŸ‘‘

the whole friend group, together at last 🫢🌸


no cap: this page comes from the ./drivers/iommu/iommufd corner of the kernel and it's dated October 2026 β€” so if you're reading it, hi from the future bestie, mwah πŸ’‹βœ¨
πŸ“¦ where this page comes from