iova_bitmap_for_each(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms