From: Jason Gunthorpe <jgg@nvidia.com>
To: Dave Airlie <airlied@gmail.com>
Cc: "Christian König" <christian.koenig@amd.com>,
dri-devel <dri-devel@lists.freedesktop.org>,
iommu@lists.linux-foundation.org,
"Alistair Popple" <apopple@nvidia.com>,
"Matthew Brost" <matthew.brost@intel.com>
Subject: Re: iommu/smmu/PCI ATS + TTM unmaps + nouveau best way forward
Date: Tue, 30 Jun 2026 20:59:49 -0300 [thread overview]
Message-ID: <20260630235949.GH7481@nvidia.com> (raw)
In-Reply-To: <CAPM=9tyajYEV7tN+J9oG0wrJfx6Sy-ydB8-ZS+izBEpDJdT0CA@mail.gmail.com>
On Wed, Jul 01, 2026 at 06:45:11AM +1000, Dave Airlie wrote:
> > Dave could be facing a fabric issue. AFAIK the ATS invalidation that
> > the iommu=strict pushses should fence the fabric so would resolve a
> > missing fabric fence. I suppose if you don't see any evidence of a
> > non-present ATS response explosion with strict then this would be a
> > really good theory.
>
> It's definitely a fabric issue, the iommu ATS invalidation is what
> "fixes" it, but I'm not figuring out how to flush it from the GPU
> side, and I'm not seeing where the official driver does this either,
> guess I have to keep digging. Maybe Alistair knows something.
Well, as I said the ATS does two things, it fences the fabric and it
will fail DMAs with ATS non-present (which doesn't trigger an iommu
log). If you are confident there are no ATS non-present events inside
the GPU then fabric is the best guess, but most likely the fabric will
clear in microseconds after the last GPU DMA so it would be a pretty
narrow race.
> From the ubuntu kernel this thing ships with:
> https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-6.14/+bug/2132033
>
> "Add two more Spark iGPU IDs for the existing iommu quirk "
>
> diff -u linux-nvidia-6.14-6.14.0/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> linux-nvidia-6.14-6.14.0/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> --- linux-nvidia-6.14-6.14.0/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> +++ linux-nvidia-6.14-6.14.0/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
> @@ -3654,7 +3654,9 @@
> if (IS_HISI_PTT_DEVICE(pdev))
> return IOMMU_DOMAIN_IDENTITY;
>
> - if (pdev->vendor == PCI_VENDOR_ID_NVIDIA && pdev->device == 0x2E12)
> + if (pdev->vendor == PCI_VENDOR_ID_NVIDIA &&
> + (pdev->device == 0x2E12 || pdev->device == 0x2E2A ||
> + pdev->device == 0x2E2B))
> return IOMMU_DOMAIN_DMA;
> }
>
>
> I should probably work out if anything upstream does this or if I can
> mess up the production driver against an upstream kernel.
Latest upstream has this fixed now in a different way, this is about
forcing ATS mode on inside the SMMU driver because spark can't work if
ATS is disabled.
Jason
next prev parent reply other threads:[~2026-06-30 23:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 9:39 iommu/smmu/PCI ATS + TTM unmaps + nouveau best way forward Dave Airlie
2026-06-30 11:24 ` Christian König
2026-06-30 11:51 ` Jason Gunthorpe
2026-06-30 20:45 ` Dave Airlie
2026-06-30 21:00 ` Dave Airlie
2026-07-01 0:17 ` Jason Gunthorpe
2026-07-01 1:22 ` Alistair Popple
2026-06-30 23:59 ` Jason Gunthorpe [this message]
2026-06-30 11:39 ` Jason Gunthorpe
2026-06-30 23:21 ` Matthew Brost
2026-07-01 1:30 ` Alistair Popple
2026-07-01 23:34 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260630235949.GH7481@nvidia.com \
--to=jgg@nvidia.com \
--cc=airlied@gmail.com \
--cc=apopple@nvidia.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=iommu@lists.linux-foundation.org \
--cc=matthew.brost@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox