Messages in this thread | | | From | "Tian, Kevin" <> | Subject | RE: [PATCH RFC v2 02/11] iommu: Add iommu_group_singleton_lockdown() | Date | Wed, 30 Mar 2022 06:55:00 +0000 |
| |
> From: Lu Baolu <baolu.lu@linux.intel.com> > Sent: Wednesday, March 30, 2022 1:00 PM > > > > btw I'm not sure whether this is what SVA requires. IIRC the problem with > > SVA is because PASID TLP prefix is not counted in PCI packet routing thus > > a DMA target address with PASID might be treated as P2P if the address > > falls into the MMIO BAR of other devices in the group. This is why the > > original code needs to strictly apply SVA in a group containing a single > > device, instead of a group attached by a single driver, unless we want to > > reserve those MMIO ranges in CPU VA space. > > You are right. But I don't think the IOMMU core is able to guarantee > above in a platform/device-agnostic way. Or any suggestions? > > I guess this should be somewhat off-loaded to the device driver which > knows details of the device. The device driver should know this and > guarantee it before calling > iommu_dev_enable_feature(dev, IOMMU_DEV_FEAT_SVA).
How would the device driver know whether SVA requests from a device might be mis-interpreted as p2p by upstreaming ports?
> > This patch itself just replaces the existing > "iommu_group_device_count(group) != 1" logic with a new one based on the > group ownership logistics. The former is obviously not friendly to > device hot joined afterward. >
IMHO this replacement changes the semantics and device hotplug is something that we must deal with...
Thanks Kevin
| |