Re: [PATCH RFCv1 1/3] PCI: Allow ATS to be always on for CXL.cache capable devices

Jason Gunthorpe
2026-02-03T14:33:57Z

On Mon, Feb 02, 2026 at 09:13:50PM -0800, Nicolin Chen wrote:
> On Wed, Jan 28, 2026 at 09:05:20AM -0400, Jason Gunthorpe wrote:
> > On Tue, Jan 27, 2026 at 04:49:07PM -0800, dan.j.williams@intel.com wrote:
> > > > Yes, ARM took the position that ATS should be left disabled for
> > > > IDENTITY both because of SMMU constraints and also because it made
> > > > some sense that you wouldn't want ATS overhead just to get a 1:1
> > > > translation.
> > >
> > > Does this mean that ARM already today does not enable ATS until driver
> > > attach, or is incremental work needed for that capability?
> >
> > All of the iommu drivers setup an iommu translation and enable ATS
> > before any driver is bound.
> >
> > We would need to do more work in the core to leave the translation
> > blocked when there is no driver. I don't think it is that difficult
>
> Hmm, not sure if we could use group->domain=NULL as "blocked..

Definately not, we need to use a proper blocked domain.

> @@ -437,8 +437,6 @@ static int driver_sysfs_add(struct device *dev)
> {
> int ret;
>
> - bus_notify(dev, BUS_NOTIFY_BIND_DRIVER);
> -
> ret = sysfs_create_link(&dev->driver->p->kobj, &dev->kobj,
> kobject_name(&dev->kobj));
> if (ret)
> @@ -638,10 +636,12 @@ static int really_probe(struct device *dev, const struct device_driver *drv)
> if (ret)
> goto pinctrl_bind_failed;
>
> + bus_notify(dev, BUS_NOTIFY_BIND_DRIVER);
> +
> if (dev->bus->dma_configure) {
> ret = dev->bus->dma_configure(dev);
> if (ret)
> - goto pinctrl_bind_failed;
> + goto bus_notify_bind_failed;
> }

We shouldn't need any of these? The dma_configure callback already
gets into the iommu code to validate the domain and restrict VFIO,
no further callbacks should be needed.

When the iommu driver is probed to the device we can assume no driver
is bound and immediately attach the blocked domain.

Jason