iommu_dma_init_domain(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… iommu_dma_init_domain(9) β€” straight out of the Kernel API Manual

okay so bestie, sit down, hydrate, and let me tell you about the single most setup-era function in the IOMMU world. it's giving "let me get you situated before the real magic happens" ✨


✨ NAME ✨

iommu_dma_init_domain β€” the girl whose whole job is initialising a DMA mapping domain πŸŽ€


πŸŽ€ SYNOPSIS πŸŽ€

int iommu_dma_init_domain (struct iommu_domain *domain , struct device
*dev );

like, that's the whole entrance exam. two args, one int back. we love a low-maintenance signature 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • domain β€” the IOMMU domain, and no she is not new here, she was previously prepared by iommu_get_dma_cookie πŸ“ like she's already been through hair and makeup, you're just doing the final fit check.
  • dev β€” the device this domain is being initialised for. that's her plus-one. her reason for being. her main character 🫢

🌸 DESCRIPTION 🌸

okay so here's the tea β˜• β€” if the geometry and the dma_range_map both include address 0, then we reserve that page so that it stays a guaranteed invalid IOVA. no cap, address 0 is not invited to the mapping party, she's literally not on the list πŸ’€

and the reinit situation? it's fine. honestly it's fine. it is safe to reinitialise a domain β€” glow-ups are allowed, rebrands are allowed, we don't gatekeep 🌈

but. if your change could make any prior IOVAs invalid, it will fail. periodt. that's the one thing we do not do here πŸ™ˆ so double-check before you go rearranging furniture, bestie.

πŸ”₯ SEE ALSO πŸ”₯

all the siblings, the whole friend group, the entire group chat πŸ‘‘:

like, read them all. iykyk πŸ’œ


and that's the page, bestie πŸ’– this whole thing lives over in ./drivers/iommu, it's dated October 2026, and it's brought to you by the Kernel API Manual β€” slay, bye, go init your domains responsibly πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from