Subject: Re: [PATCH v6 1/3] PCI: Add pci_ats_required() for CXL.cache capable devices

From: Bjorn Helgaas <[email-masked]>
Date: Thu, 21 May 2026 16:31:23 -0500

On Thu, May 21, 2026 at 02:07:34PM -0700, Nicolin Chen wrote:
> On Thu, May 21, 2026 at 03:57:23PM -0500, Bjorn Helgaas wrote:
> > On Thu, May 21, 2026 at 01:34:20PM -0700, Nicolin Chen wrote:
> > > +bool pci_ats_required(struct pci_dev *pdev)
> > > +{
> > > +	if (!pci_ats_supported(pdev))
> > > +		return false;
> > > +
> > > +	/* A VF inherits its PF's requirement for ATS function */
> > > +	if (pdev->is_virtfn)
> > > +		pdev = pci_physfn(pdev);
> > > +
> > > +	return pci_cxl_ats_required(pdev);
> > 
> > I acked this before I saw this sashiko feedback, which looks like a
> > legit issue to me:
> > 
> >   Will this VF inheritance logic ever be reached?
> > 
> >   According to the PCIe SR-IOV specification (section 9.3.3.1), VFs do
> >   not implement the ATS Extended Capability, which means pdev->ats_cap
> >   is always 0 for VFs.

Huh.  I wish sashiko would include the spec revision because that sure
looks wrong.  In PCIe r7.0, there is no sec 9.3.3.1.  In PCIe r6.0,
sec 9.3.3.1 is the SR-IOV Extended Capability, which doesn't mention
ATS.  In both, sec 10.5.1 is the ATS Extended Capability and says both
PFs and VFs can implement it.

So I think this is OK as-is:

Acked-by: Bjorn Helgaas <[email-masked]>