On Wed, May 25 2016 at 08:45:58 PM, Alex Williamson <alex.williamson@xxxxxxxxxx> wrote: >> Why do we do that? If the devices have different BDFs can't we safely >> say that they're protected from peer-to-peer DMA (assuming no DMA >> aliasing quirks)? Even as I write that out it seems wrong though since >> the RC can probably do whatever it wants... >> >> Maybe the IOMMU framework can't actually know whether the devices should >> be kept in separate groups and we just need to do something custom in >> the arm-smmu driver? > > You're only considering the visibility of devices to the IOMMU, not the > isolation between devices. Without ACS peer-to-peer can be re-routed > between devices before the IOMMU even knows about it. That's why the > root port is included in the group. I'm confused why your driver is > using the IOMMU API instead of the much more common DMA API anyway > though. Thanks, > > Alex Ah ok, thanks for the explanation! The driver *is* using the DMA API. I'm actually working on the DMA APIs themselves (a hacked-up version of the arm32 DMA APIs that have been forklifted into arm64, to be exact). Anyways, it looks like the best route for us long-term is to try and align with Robin's arm64 IOMMU DMA API mapper and take it from there. -Mitch -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html