iommu_dma_init_domain(9)
π 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 byiommu_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 π:
- kernel file
./drivers/iommu/dma-iommu.c(yes, that's where she lives π‘) iommu_get_dma_cookie(9)iommu_get_msi_cookie(9)iommu_put_dma_cookie(9)iommu_put_msi_cookie(9)iommu_dma_get_resv_regions(9)iommu_dma_init_options(9)dma_info_to_prot(9)dma_iova_try_alloc(9)dma_iova_free(9)dma_iova_link(9)dma_iova_sync(9)dma_iova_unlink(9)dma_iova_destroy(9)
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
- 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