Re: [PATCH v4 02/21] iommufd: Add iommufd_sw_map_msi()
Jason Gunthorpe <[email protected]>
| Newsgroups | org.infradead.lists.linux-riscv,dev.linux.lists.iommu,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Aug 25, 2026 at 07:38:50PM +0200, Andrew Jones wrote: > The IRQ domain is per-device because it is part of the device's IRQ > hierarchy. It does not own the MSI table. It reaches the device's attached > IOMMU domain, which owns the mappings and MSI-table state. If a device is > behind parallel IOMMUs, the IOMMU domain implementation must program the > same mappings into all of them, just as it does for ordinary DMA. The iommu driver should not be deeply involved in managing interrupts, its is wrong layering. Having the irq side present things it owns, like the physical page to iommu_dma_prepare_msi() or an entire remapping table, is much more reasonable, IMHO. Even the x86 drivers with their mixed HW still put the irqdomain in charge of the msi related datastructures inside the iommu (including irqdomain directly editing device contexts!) > Right, the host does not use the MSI table. Host remapping replaces the > physical IMSIC address composed by the irqchip with an IOVA that the > device's ordinary paging domain maps back to that address. That's what iommu_dma_prepare_msi() is for, it shouldn't be wrapped in an irqdomain. Jason _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv