[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250630224924.GC167785@nvidia.com>
Date: Mon, 30 Jun 2025 19:49:24 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Nicolin Chen <nicolinc@...dia.com>
Cc: Baolu Lu <baolu.lu@...ux.intel.com>, joro@...tes.org, will@...nel.org,
robin.murphy@....com, rafael@...nel.org, lenb@...nel.org,
bhelgaas@...gle.com, iommu@...ts.linux.dev,
linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
linux-pci@...r.kernel.org, patches@...ts.linux.dev,
pjaroszynski@...dia.com, vsethi@...dia.com, helgaas@...nel.org
Subject: Re: [PATCH RFC v2 3/4] iommu: Introduce iommu_dev_reset_prepare()
and iommu_dev_reset_done()
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
Powered by blists - more mailing lists