iommu/amd: Refactor device iotlb invalidation code
authorVasant Hegde <vasant.hegde@amd.com>
Wed, 22 Nov 2023 09:02:12 +0000 (09:02 +0000)
committerJoerg Roedel <jroedel@suse.de>
Mon, 11 Dec 2023 14:25:36 +0000 (15:25 +0100)
commitbbf85fe10faadbd237a7b8df4423de4ab4bd67e7
tree6014f2b67c8d6afc628edc376afaac8c20048c25
parent4f0a600799237ed95b403f24354305b0f81ccbb4
iommu/amd: Refactor device iotlb invalidation code

build_inv_iotlb_pages() and build_inv_iotlb_pasid() pretty much duplicates
the code. Enhance build_inv_iotlb_pages() to invalidate guest IOTLB as
well. And remove build_inv_iotlb_pasid() function.

Suggested-by: Kishon Vijay Abraham I <kvijayab@amd.com>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20231122090215.6191-7-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/iommu.c