iova_bitmap_for_each(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay bestie, welcome to iova_bitmap_for_each(9) from the Kernel API Manual β€” the helper that’s literally all about iterating over the bitmap. πŸ¦‹βœ¨

πŸŽ€ NAME πŸŽ€

iova_bitmap_for_each β€” iterates over the bitmap. That’s the whole vibe, no cap.

✨ SYNOPSIS ✨

int iova_bitmap_for_each (struct iova_bitmap *bitmap , void *opaque ,
       iova_bitmap_fn_t fn );

🫢 ARGUMENTS 🫢

  • bitmap β€” the IOVA bitmap you’re iterating, bestie. πŸ’–
  • opaque β€” extra argument to pass to the callback. πŸŽ€
  • fn β€” function that gets called for each IOVA range. ✨

🌸 DESCRIPTION 🌸

Okay so picture this: you’ve got bitmap data representing a portion of IOVA space, and you need to iterate it. This is the helper function for exactly that. It hides the complexity of iterating bitmaps and translating the mapped bitmap user pages into IOVA ranges to process. Lowkey iconic β€” it’s giving β€œI’ll handle the messy parts, you bring the callback.” πŸ’…πŸ”₯

πŸ’… RETURN πŸ’…

Returns 0 on success, and an error on failure either upon iteration or when the callback returns an error. So like, success is 0, but if iteration itself fails or your callback returns an error, you get an error back. Periodt. 🫢

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./drivers/iommu/iommufd/iova_bitmap.c is the spot, and these related cuties are right there too:


Mwah πŸ’‹ β€” source/version ./drivers/iommu/iommufd, date October 2026, page iova_bitmap_for_each(9). Bye bestie! πŸŽ€βœ¨

πŸ“¦ where this page comes from