STRUCT IOMMU_DIRTY_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct iommu_dirty_ops(9) πŸŽ€

okay so bestie, welcome to the Kernel API Manual ✨ β€” yes it's the kernel, yes it's a struct, yes we're gonna get through this together, and yes you're gonna slay it πŸ’…


✨ NAME ✨

struct iommu_dirty_ops β€” the domain specific dirty tracking operations, periodt 🫢

Like, that's literally her whole job: tracking what's dirty in your domain. Iconic behavior honestly.


🌸 SYNOPSIS 🌸

here's what she looks like, no notes:

struct iommu_dirty_ops {
    int (*set_dirty_tracking)(struct iommu_domain *domain, bool
enabled);
    int (*read_and_clear_dirty)(struct iommu_domain *domain, unsigned
long iova, size_t size, unsigned long flags, struct iommu_dirty_bitmap
*dirty);
 };

that's two function pointers and honestly? she ate πŸ”₯


πŸ’œ Members πŸ’œ

set_dirty_tracking πŸ’…

Enables or Disables the dirty tracking on the iommu domain β€” that's the whole vibe. On or off, bestie, no in-between πŸ¦‹

read_and_clear_dirty 🧚

okay this one is doing the most and we love her for it. She walks the IOMMU page tables for dirtied PTEs marshalled into a bitmap, with a bit represented as a page ⭐ She reads the dirty PTE bits, and then she clears it from the IO pagetables. Read, then clear. Cleanup queen πŸ‘‘

πŸŽ€ read carefully: the clearing is part of the deal β€” it reads the dirty bits and clears them from the IO pagetables. That's the whole function name, and she is not lying to you.

🌈 SEE ALSO 🌈

bestie there are SO many friends here, it's giving family reunion 😭 all of these live in the kernel file ./include/linux/iommu.h:

literally the whole group chat πŸ’– go say hi, iykyk.


πŸ¦‹ tiny footnote energy: this page lives at ./include/linux, and the version on deck is dated October 2026.

and that's the page, bestie β€” you understood it, you're a main character, go read some page tables πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from