mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 07:03:28 -04:00
PCI/ATS: Ensure pci_ats_supported() is PF-aware for VFs
Update pci_ats_supported() to additionally check the associated PF's status when called on a VF. This ensures that PF-level quirks and untrusted status are correctly propagated to VFs, providing a robust support check that aligns with the kernel's PF-centric ATS configuration model and is immune to the timing of VF-specific fixups. Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Samiullah Khawaja <skhawaja@google.com> Reviewed-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Pranjal Shrivastava <praan@google.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
This commit is contained in:
committed by
Joerg Roedel
parent
8cdeaa50ea
commit
4f2cd6091a
@@ -40,10 +40,13 @@ void pci_ats_init(struct pci_dev *dev)
|
||||
*/
|
||||
bool pci_ats_supported(struct pci_dev *dev)
|
||||
{
|
||||
if (!dev->ats_cap)
|
||||
if (!dev->ats_cap || dev->untrusted)
|
||||
return false;
|
||||
|
||||
return (dev->untrusted == 0);
|
||||
if (dev->is_virtfn)
|
||||
return pci_ats_supported(pci_physfn(dev));
|
||||
|
||||
return true;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pci_ats_supported);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user