Skip to content

Commit c694bc8

Browse files
easwarhjoergroedel
authored andcommitted
iommu/amd: Enable PASID and ATS capabilities in the correct order
Per the PCIe spec, behavior of the PASID capability is undefined if the value of the PASID Enable bit changes while the Enable bit of the function's ATS control register is Set. Unfortunately, pdev_enable_caps() does exactly that by ordering enabling ATS for the device before enabling PASID. Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Cc: Vasant Hegde <vasant.hegde@amd.com> Cc: Jason Gunthorpe <jgg@nvidia.com> Cc: Jerry Snitselaar <jsnitsel@redhat.com> Fixes: eda8c28 ("iommu/amd: Enable device ATS/PASID/PRI capabilities independently") Signed-off-by: Easwar Hariharan <eahariha@linux.microsoft.com> Reviewed-by: Vasant Hegde <vasant.hegde@amd.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20250703155433.6221-1-eahariha@linux.microsoft.com Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
1 parent 025d137 commit c694bc8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/iommu/amd/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,8 @@ static inline void pdev_disable_cap_pasid(struct pci_dev *pdev)
634634

635635
static void pdev_enable_caps(struct pci_dev *pdev)
636636
{
637-
pdev_enable_cap_ats(pdev);
638637
pdev_enable_cap_pasid(pdev);
638+
pdev_enable_cap_ats(pdev);
639639
pdev_enable_cap_pri(pdev);
640640
}
641641

0 commit comments

Comments
 (0)