On Mon, Jun 30, 2025 at 10:29:12AM -0700, Nicolin Chen wrote: > On Mon, Jun 30, 2025 at 09:38:14AM -0300, Jason Gunthorpe wrote: > > On Sat, Jun 28, 2025 at 09:28:12PM +0800, Baolu Lu wrote: > > > > > Does this mean the IOMMU driver should disable ATS when ops- > > > >blocked_domain is used? This might not be feasible because ops- > > > >blocked_domain might possibly be attached to a PASID of a device, > > > while other PASIDs still use ATS for functionality. > > > > No.. The above should be setting everything, including PASIDs to the > > blocked domain. > > > > The driver doesn't have to disable ATS at the device, but ARM does. > > Oh, the code is expecting a pci_disable_ats() call, as the next > patch will check if ats is disabled on the PCI side.. I would not bother, it is alot more work to fix AMD and Intel iommu drivers and I don't think it really buys us anything.. > If that's the case, we'd have to leave the ATS enabled but only > trust that iommu driver won't issue any new ATS invalidation? Yes. > > ops->blocked_domain is not good, we support devices without static > > blocking domain. But yes, using DOMAIN_BLOCKED is not greap, there is > > a group->blocked_domain that should be used and will dynamicaly create > > an empty paging domain if needed. > > You mean we should use the group->blocking_domain, even if it was > allocated to be a paging domain as the driver doesn't understand > a IOMMU_DOMAIN_BLOCKED yet? Yes, and you just get a group->blocking_domain to assign for the same reason. Jason