iommu/vt-d: Avoid unnecessary cache flush in pasid entry teardown
authorLu Baolu <baolu.lu@linux.intel.com>
Sat, 20 Mar 2021 02:54:15 +0000 (10:54 +0800)
committerJoerg Roedel <jroedel@suse.de>
Wed, 7 Apr 2021 09:55:47 +0000 (11:55 +0200)
commit8b74b6ab253866450c131e9134642efb40439c91
tree2d08db67c1e29688454bedc16ee3955455fa8477
parentc0474a606ecb9326227b4d68059942f9db88a897
iommu/vt-d: Avoid unnecessary cache flush in pasid entry teardown

When a present pasid entry is disassembled, all kinds of pasid related
caches need to be flushed. But when a pasid entry is not being used
(PRESENT bit not set), we don't need to do this. Check the PRESENT bit
in intel_pasid_tear_down_entry() and avoid flushing caches if it's not
set.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20210320025415.641201-6-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/pasid.c