]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu/amd: Enable device ATS/PASID/PRI capabilities independently
authorVasant Hegde <vasant.hegde@amd.com>
Thu, 21 Sep 2023 09:21:46 +0000 (09:21 +0000)
committerJoerg Roedel <jroedel@suse.de>
Mon, 25 Sep 2023 10:39:06 +0000 (12:39 +0200)
commiteda8c2860ab6799620c6fbb8600d56e32f437a90
tree8f971c67a1bb93658218ca750b1b8e55fafe054b
parent92e2bd56a5f9fc44313fda802a43a63cc2a9c8f6
iommu/amd: Enable device ATS/PASID/PRI capabilities independently

Introduce helper functions to enable/disable device ATS/PASID/PRI
capabilities independently along with the new pasid_enabled and
pri_enabled variables in struct iommu_dev_data to keep track,
which allows attach_device() and detach_device() to be simplified.

Co-developed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
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-14-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/amd_iommu.h
drivers/iommu/amd/amd_iommu_types.h
drivers/iommu/amd/iommu.c