]> git.dujemihanovic.xyz Git - linux.git/commit
iommu/vt-d: Add cache tag invalidation helpers
authorLu Baolu <baolu.lu@linux.intel.com>
Wed, 24 Apr 2024 07:16:34 +0000 (15:16 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 26 Apr 2024 09:57:42 +0000 (11:57 +0200)
commitc4d27ffaa8eb034ec438a9aedfe202ce81e15312
tree858f787fd5aa63069d39371b814ab0670abe0e79
parent3b1d9e2b2d6856eabf5faa12d20c97fef657999f
iommu/vt-d: Add cache tag invalidation helpers

Add several helpers to invalidate the caches after mappings in the
affected domain are changed.

- cache_tag_flush_range() invalidates a range of caches after mappings
  within this range are changed. It uses the page-selective cache
  invalidation methods.

- cache_tag_flush_all() invalidates all caches tagged by a domain ID.
  It uses the domain-selective cache invalidation methods.

- cache_tag_flush_range_np() invalidates a range of caches when new
  mappings are created in the domain and the corresponding page table
  entries change from non-present to present.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20240416080656.60968-3-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/cache.c
drivers/iommu/intel/iommu.c
drivers/iommu/intel/iommu.h