diff options
author | Vasant Hegde <vasant.hegde@amd.com> | 2023-09-21 09:21:45 +0000 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2023-09-25 12:39:06 +0200 |
commit | 92e2bd56a5f9fc44313fda802a43a63cc2a9c8f6 (patch) | |
tree | 98429c4437a967e722bc5411b644d5b71b7e3873 /drivers/fpga/versal-fpga.c | |
parent | 739eb25514c90aa8ea053ed4d2b971f531e63ded (diff) |
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 9bf49e36d718 ("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>
Diffstat (limited to 'drivers/fpga/versal-fpga.c')
0 files changed, 0 insertions, 0 deletions