iommu/vt-d: Use cache helpers in arch_invalidate_secondary_tlbs
authorLu Baolu <baolu.lu@linux.intel.com>
Wed, 24 Apr 2024 07:16:41 +0000 (15:16 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 26 Apr 2024 09:57:47 +0000 (11:57 +0200)
commit4f609dbff51b3c98d5fc841758a20be74ab3f132
tree3e616f6949273678fbc83119d00393d890f76c6a
parent8ebc22366ed8bb2cbcf215bfa3fabb4f36d10a91
iommu/vt-d: Use cache helpers in arch_invalidate_secondary_tlbs

The arch_invalidate_secondary_tlbs callback is called in the SVA mm
notification path. It invalidates all or a range of caches after the
CPU page table is modified. Use the cache tag helps in this path.

The mm_types defines vm_end as the first byte after the end address
which is different from the iommu gather API, hence convert the end
parameter from mm_types to iommu gather scheme before calling the
cache_tag helper.

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-10-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.h
drivers/iommu/intel/svm.c