linux/drivers/iommu/amd
Vasant Hegde 92e2bd56a5 iommu/amd: Introduce iommu_dev_data.flags to track device capabilities
Currently we use struct iommu_dev_data.iommu_v2 to keep track of the device
ATS, PRI, and PASID capabilities. But these capabilities can be enabled
independently (except PRI requires ATS support). Hence, replace
the iommu_v2 variable with a flags variable, which keep track of the device
capabilities.

From commit 9bf49e36d7 ("PCI/ATS: Handle sharing of PF PRI Capability
with all VFs"), device PRI/PASID is shared between PF and any associated
VFs. Hence use pci_pri_supported() and pci_pasid_features() instead of
pci_find_ext_capability() to check device PRI/PASID support.

Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Link: https://lore.kernel.org/r/20230921092147.5930-13-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2023-09-25 12:39:06 +02:00
..
amd_iommu.h iommu/amd: Modify logic for checking GT and PPR features 2023-09-25 12:39:04 +02:00
amd_iommu_types.h iommu/amd: Introduce iommu_dev_data.flags to track device capabilities 2023-09-25 12:39:06 +02:00
debugfs.c
init.c iommu/amd: Modify logic for checking GT and PPR features 2023-09-25 12:39:04 +02:00
io_pgtable.c iommu/amd: Use page mode macros in fetch_pte() 2023-05-22 17:17:41 +02:00
io_pgtable_v2.c iommu/amd: Miscellaneous clean up when free domain 2023-09-25 12:39:02 +02:00
iommu.c iommu/amd: Introduce iommu_dev_data.flags to track device capabilities 2023-09-25 12:39:06 +02:00
iommu_v2.c IOMMU Updates for Linux v6.6 2023-09-01 16:54:25 -07:00
Kconfig iommu/dma: Clean up Kconfig 2022-09-07 14:46:59 +02:00
Makefile iommu/amd: Initial support for AMD IOMMU v2 page table 2022-09-07 16:12:35 +02:00
quirks.c iommu/amd: Include PCI segment ID when initialize IOMMU 2022-07-07 09:37:51 +02:00