From: Nicolin Chen <nicolinc@nvidia.com>
To: Pranjal Shrivastava <praan@google.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>, <iommu@lists.linux.dev>,
Will Deacon <will@kernel.org>, Joerg Roedel <joro@8bytes.org>,
Robin Murphy <robin.murphy@arm.com>,
Mostafa Saleh <smostafa@google.com>,
"Samiullah Khawaja" <skhawaja@google.com>,
Daniel Mentz <danielmentz@google.com>,
"Pasha Tatashin" <pasha.tatashin@soleen.com>,
David Matlack <dmatlack@google.com>
Subject: Re: [PATCH rc v2] iommu/arm-smmu-v3: Fix inconsistent ATS state tracking
Date: Tue, 5 May 2026 14:44:27 -0700 [thread overview]
Message-ID: <afpkuz31tGtCZ2rT@nvidia.com> (raw)
In-Reply-To: <afpfwwmUeNbs1juV@google.com>
On Tue, May 05, 2026 at 09:23:15PM +0000, Pranjal Shrivastava wrote:
> On Tue, May 05, 2026 at 01:21:37PM -0700, Nicolin Chen wrote:
> > /**
> > * pci_prepare_ats - Setup the PS for ATS
> > * @dev: the PCI device
> > * @ps: the IOMMU page shift
> > *
> > * This must be done by the IOMMU driver on the PF before any VFs are created to
> > * ensure that the VF can have ATS enabled.
> >
> > But it returns 0 directly on dev->is_virtfn.
> >
> > I wonder if this function itself should just fail if dev->is_virtfn
> > and !pci_physfn(dev)->ats_stu?
> >
>
> Just wondering if there's a use-case that might break?
Well, even a break would be what the kdoc statement demands :-/
> Otherwise, in
> current context I agree that we should fail if ats_stu == 0 / mis-match
Yea, should check mis-match. "== 0" doesn't guarantee the enable
success.
> > Then, arm_smmu_probe_device() must fail if pci_prepare_ats() fails.
>
> I don't think probe device should fail, we should just mark that ATS
> isn't supported for the function? right?
PF must be probed() first with ats_stu set correctly. If VF gets
probed before that or with a different ats_stu, something must be
wrong.
Again, following the kdoc statement, VF should not be "created"
in this case. Or should we read it differently? :-/
Nicolin
next prev parent reply other threads:[~2026-05-05 21:44 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 16:38 [PATCH rc v2] iommu/arm-smmu-v3: Fix inconsistent ATS state tracking Pranjal Shrivastava
2026-05-04 18:01 ` Nicolin Chen
2026-05-04 19:33 ` Pranjal Shrivastava
2026-05-04 20:03 ` Pranjal Shrivastava
2026-05-04 20:23 ` Nicolin Chen
2026-05-04 20:29 ` Pranjal Shrivastava
2026-05-04 20:51 ` Nicolin Chen
2026-05-04 20:40 ` Pranjal Shrivastava
2026-05-04 20:54 ` Nicolin Chen
2026-05-05 16:11 ` Jason Gunthorpe
2026-05-05 20:21 ` Nicolin Chen
2026-05-05 21:23 ` Pranjal Shrivastava
2026-05-05 21:44 ` Nicolin Chen [this message]
2026-05-05 22:06 ` Pranjal Shrivastava
2026-05-06 20:44 ` Samiullah Khawaja
2026-05-05 21:14 ` Pranjal Shrivastava
2026-05-05 22:32 ` Pranjal Shrivastava
2026-05-06 9:46 ` Jason Gunthorpe
2026-05-06 20:19 ` Pranjal Shrivastava
2026-05-06 22:03 ` Pranjal Shrivastava
2026-05-06 21:57 ` Pranjal Shrivastava
2026-05-06 22:04 ` Pranjal Shrivastava
2026-05-09 17:14 ` Jason Gunthorpe
2026-05-11 12:07 ` Pranjal Shrivastava
2026-05-11 14:16 ` Jason Gunthorpe
2026-05-11 16:07 ` Pranjal Shrivastava
2026-05-11 16:30 ` David Matlack
2026-05-11 16:57 ` Pranjal Shrivastava
2026-05-11 17:03 ` Jason Gunthorpe
2026-05-06 22:20 ` Samiullah Khawaja
2026-05-07 20:12 ` Pranjal Shrivastava
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=afpkuz31tGtCZ2rT@nvidia.com \
--to=nicolinc@nvidia.com \
--cc=danielmentz@google.com \
--cc=dmatlack@google.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=joro@8bytes.org \
--cc=pasha.tatashin@soleen.com \
--cc=praan@google.com \
--cc=robin.murphy@arm.com \
--cc=skhawaja@google.com \
--cc=smostafa@google.com \
--cc=will@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.