STRUCT IOMMU_FLUSH_OPS(9)
β¨ 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 theiommu_iotlb_gatherstructure and defer the invalidation untiliommu_iotlb_syncinstead. 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 π
struct io_pgtable_cfg(9)struct arm_lpae_io_pgtable_walk_data(9)struct io_pgtable_ops(9)alloc_io_pgtable_ops(9)free_io_pgtable_ops(9)struct io_pgtable(9)enum io_pgtable_caps(9)struct io_pgtable_init_fns(9)
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
- 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