Messages in this thread | | | Date | Tue, 29 Mar 2022 08:42:59 -0300 | From | Jason Gunthorpe <> | Subject | Re: [PATCH RFC v2 02/11] iommu: Add iommu_group_singleton_lockdown() |
| |
On Tue, Mar 29, 2022 at 08:42:13AM +0000, Tian, Kevin wrote:
> 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.
I think it is not such a good idea to mix up group with this test
Here you want to say that all TLPs from the RID route to the host bridge - ie ACS is on/etc. This is subtly different from a group with a single device. Specifically it is an immutable property of the fabric and doesn't change after hot plug events.
ie if we have a singleton group that doesn't have ACS and someone hotplugs in another device on a bridge, then our SVA is completely broken and we get data corruption.
Testing the group size is inherently the wrong test to make.
Jason
| |