On Wed, May 28, 2025 at 03:42:55PM -0700, Jacob Pan wrote: > > All IOVA that the platform cannot DMA from should be reported in the > > reserved_regions file as "reserved". You must make your platform > > achieve this. > > > Just to double confirm, the expected reserved region should be marked as > "direct" instead of "msi", right?
I don't know, it depends what is wrong with this platform. "msi" is the SW_MSI region created by the iommu driver, ignore it. "reserved" should be from the DT and it says "my platform is broken, this IOVA doesn't work, don't use it" "direct" is something entirely different, it also should come from the DT and it says "must be mapped 1:1 (iova:physical) at all times" which usually means some FW or other component is controlling the device and doing DMA using that physical memory space which is unknown to the OS. Both cases would interfere with the MSI so if the DT/ACPI declares such regions that overlap with the SW_MSI address then Linux should select another SW_MSI address. >From a linux perspective "reserved" just ignores those IOVA spaces while "direct" sets up 1:1 translations there. So FW using direct incorrectly could become a security problem. Jason