STRUCT PT_IOMMU(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct pt_iommu(9) ✨

okay so bestie, welcome to the kernel API manual β€” this one's struct pt_iommu(9) and it's literally the blueprint, the main character struct, the whole vibe πŸ’…

🌸 NAME 🌸

struct pt_iommu β€” the base structure for IOMMU page tables πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct pt_iommu {
    struct iommu_domain domain;
    const struct pt_iommu_ops *ops;
    const struct pt_iommu_driver_ops *driver_ops;
    int nid;
    struct device *iommu_device;
 };

πŸ’– Members πŸ’–

  • domain β€” the core IOMMU domain, the moment, the whole point 🫢 the driver should use a union to overlay this memory with its previously existing domain struct so it creates an alias. iykyk.
  • ops β€” function pointers to access the API. that's it, that's the vibe ✨
  • driver_ops β€” function pointers that the HW driver provides to help manage HW details like caches πŸ’€ lowkey the hardware-handling squad.
  • nid β€” the Node ID to use for table memory allocations. the IOMMU driver may want to set the NID to the device's NID if there are multiple table walkers πŸ‘€ (multiple walkers = much chaos, plan accordingly).
  • iommu_device β€” device pointer used for any DMA cache flushing when PT_FEAT_DMA_INCOHERENT πŸ”₯ this is the iommu device that created the page table, which must have dma ops that perform cache flushing. no cap, that part is non-negotiable.

πŸ‘‘ Description πŸ‘‘

so here's the tea: the format-specific struct will include this as the first member 🌈. that's the whole description, bestie β€” it's short but it ate.


πŸ” SEE ALSO πŸ”

  • Kernel file ./include/linux/generic_pt/iommu.h
  • IOMMU Radix Page Table(9)
  • struct pt_iommu_info(9)
  • struct pt_iommu_driver_ops(9)
  • struct pt_iommu_cfg(9)

go read the rest of the family, they're all iconic ⭐


πŸ’œ fr fr take the iommu_device DMA-ops cache-flushing requirement seriously β€” that's a real correctness thing, not just a vibe check.

later bestie!! this page lives in ./include/linux/generic_pt, stamped October 2026 β€” go touch some page tables πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from