On Mon, 1 Jul 2024 19:23:16 +0800, Lu Baolu<baolu.lu@xxxxxxxxxxxxxxx>
wrote:
+ if (flush_domains) {Is it worth going through 1M PASIDs just to skip the PASID cache
+ /*
+ * If the IOMMU is running in scalable mode and there
might
+ * be potential PASID translations, the caller should
hold
+ * the lock to ensure that context changes and cache
flushes
+ * are atomic.
+ */
+ assert_spin_locked(&iommu->lock);
+ for (i = 0; i < info->pasid_table->max_pasid; i++) {
+ pte = intel_pasid_get_entry(info->dev, i);
+ if (!pte || !pasid_pte_is_present(pte))
+ continue;
invalidation? Or just do the flush on all used DIDs unconditionally.