STRUCT IOMMU_FWSPEC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct iommu_fwspec(9) ✨

okay so bestie, welcome to the Kernel API Manual β€” this one's all about struct iommu_fwspec, aka the per-device IOMMU instance data. it's giving "small struct, big responsibilities" tbh 🫢


🌸 NAME 🌸

struct iommu_fwspec β€” per-device IOMMU instance data πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

struct iommu_fwspec {
    struct fwnode_handle    *iommu_fwnode;
    u32 flags;
    unsigned int            num_ids;
    u32 ids[];
 };

like, that's the whole struct. cute, right? four fields and a flex array. iconic. ✨


πŸ¦‹ Members πŸ¦‹

  • iommu_fwnode β€” the firmware handle for this device's IOMMU. literally the "who's your IOMMU" pointer 🌈
  • flags β€” the IOMMU_FWSPEC_* flags. yes, all of them. iykyk πŸ’«
  • num_ids β€” number of associated device IDs. it's giving headcount πŸ“
  • ids β€” the IDs which this device may present to the IOMMU. the whole guest list, basically πŸŽ€

πŸ’œ Description πŸ’œ

okay so this is important, no cap: the IDs (and honestly any other information stored in this structure) should be considered private to the IOMMU device driver. they are not to be used directly by IOMMU consumers. πŸ™ˆ

bestie please do not touch. that data is not yours, it's the driver's. hands off. πŸ’…

like, i cannot stress this enough β€” the manpage says "and any other information, really," which is such a mood, but fr fr it means everything in there is off-limits to consumers. periodt. πŸ”₯


🌟 SEE ALSO 🌟

Kernel file ./include/linux/iommu.h, plus this whole squad right here πŸ‘‘


aaaand that's the whole page, bestie, ate and left no crumbs πŸ’– this lil gem lives over in ./include/linux and the version stamp says October 2026 β€” so like, future vibes only πŸ¦‹βœ¨ mwah, go read your kernel headers responsibly πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from