]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iommu/vt-d: Consolidate the struct dev_pasid_info add/remove
authorYi Liu <yi.l.liu@intel.com>
Fri, 8 Nov 2024 02:13:56 +0000 (10:13 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 8 Nov 2024 13:04:52 +0000 (14:04 +0100)
commitd93cf86cc66a0b8ae80da8c1ffd6903897786124
tree63de3dfe1687642ce73dafad7509b9f0973ca59e
parent7543ee63e8113aa34b07df3b16b3b9d2c5f73939
iommu/vt-d: Consolidate the struct dev_pasid_info add/remove

The domain_add_dev_pasid() and domain_remove_dev_pasid() are added to
consolidate the adding/removing of the struct dev_pasid_info. Besides,
it includes the cache tag assign/unassign as well.

This also prepares for adding domain replacement for pasid. The
set_dev_pasid callbacks need to deal with the dev_pasid_info for both old
and new domain. These two helpers make the life easier.

intel_iommu_set_dev_pasid() and intel_svm_set_dev_pasid() are updated to
use the helpers.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Link: https://lore.kernel.org/r/20241107122234.7424-6-yi.l.liu@intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c
drivers/iommu/intel/iommu.h
drivers/iommu/intel/svm.c