STRUCT DEV_IOMMU(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so bestie, welcome to struct dev_iommu(9) from the Kernel API Manual β€” it's literally the collection of per-device IOMMU data πŸ’…

Like, struct dev_iommu is the whole vibe: one lil bundle holding all the IOMMU-ish stuff that belongs to a single device. Iconic. Periodt.


✨ SYNOPSIS ✨

struct dev_iommu {
    struct mutex lock;
    struct iommu_fault_param *fault_param;
    struct iommu_fwspec             *fwspec;
    struct iommu_device             *iommu_dev;
    void *priv;
    u32 max_pasids;
    u32 attach_deferred:1;
    u32 pci_32bit_workaround:1;
    u32 require_direct:1;
    u32 shadow_on_flush:1;
 };

no cap, that's the whole struct right there 🫢


πŸŽ€ Members πŸŽ€

okay let's go field by field, bestie, no skipping πŸ‘‘

  • fault_param β€” the IOMMU detected device fault reporting data. it's giving "receipts for when things go wrong" 😭
  • fwspec β€” the IOMMU fwspec data πŸ“Ž
  • iommu_dev β€” the IOMMU device that this device is linked to. main character energy, fr fr πŸ”—
  • priv β€” the IOMMU Driver private data πŸ™ˆ (yes it's private, don't be nosy)
  • max_pasids β€” the number of PASIDs this device can consume πŸ”’
  • attach_deferred β€” the dma domain attachment is deferred ⏳
  • pci_32bit_workaround β€” Limit DMA allocations to 32-bit IOVAs 🧚
  • require_direct β€” device requires IOMMU_RESV_DIRECT regions ⭐
  • shadow_on_flush β€” IOTLB flushes are used to sync shadow tables πŸ¦‹
also lowkey note there's a lock (a struct mutex) sitting at the top of the struct in the synopsis β€” the manpage doesn't give it its own little Member blurb, so like, don't come for me, I'm just reporting what's there πŸ’€

🌈 Description 🌈

okay so here's the tea: this section is literally a TODO β˜•

TODO: migrate other per device data pointers under iommu_dev_data, e.g. c struct iommu_group *iommu_group;

so yeah, the description is basically an "I'll finish this later" note from the kernel devs β€” honestly relatable, we've all been there 😭🫢


πŸ”₯ SEE ALSO πŸ”₯

bestie you already KNOW there's a whole friend group, all from the kernel file ./include/linux/iommu.h:

like, the whole extended universe, iykyk πŸ‘‘πŸ’œ


so that's the page, bestie πŸŽ€ it lives in ./include/linux and the footer says October 2026 β€” mwah, go read the other ones too, ily, bye πŸ’–

πŸ“¦ where this page comes from