STRUCT IOMMU_FLUSH_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct iommu_flush_ops(9) ✨

okay so bestie, we're in the Kernel API Manual today and this one is genuinely a vibe β€” it's all about the callbacks an IOMMU uses to keep its TLB and page tables from going feral πŸ’…


πŸŽ€ NAME πŸŽ€

struct iommu_flush_ops β€” the IOMMU callbacks for TLB and page table management. that's it, that's the whole thing, no cap 🫢


🌸 SYNOPSIS 🌸

struct iommu_flush_ops {
    void (*tlb_flush_all)(void *cookie);
    void (*tlb_flush_walk)(unsigned long iova, size_t size, size_t
granule, void *cookie);
    void (*tlb_add_page)(struct iommu_iotlb_gather *gather, unsigned
long iova, size_t granule, void *cookie);
 };

like, look at her. three function pointers and a dream ✨


πŸ¦‹ Members πŸ¦‹

  • tlb_flush_all β€” synchronously nukes the entire TLB context. all of it. gone. iconic πŸ’€
  • tlb_flush_walk β€” synchronously invalidates all the intermediate TLB state for a virtual address range β€” this is the thing people sometimes call the "walk cache", iykyk 🧚
  • tlb_add_page β€” optional callback that queues up a leaf TLB invalidation for a single page. IOMMUs that can't batch TLB invalidation operations efficiently will typically just issue them right here instead, but others may decide to update the iommu_iotlb_gather structure and defer the invalidation until iommu_iotlb_sync instead. choose your fighter πŸŽ€

πŸ’œ Description πŸ’œ

⚠️ heads up bestie: these can all be called in atomic context, so they must therefore not block. like, at all. do not do it. not even a little πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./include/linux/io-pgtable.h β€” go read it, it's giving main character energy πŸ‘‘


and that's the whole page, bestie!! this one lives in ./include/linux and it's dated October 2026 β€” slay, periodt, go flush some TLBs responsibly πŸ’–πŸ¦‹β­

πŸ“¦ where this page comes from