allocate a pasid table does not mean it gets used by iommu hw, not until it---This isn't comprehensive. The clflush should be called whenever the
drivers/iommu/intel/iommu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 59df7e42fd53..b4878c7ac008 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -1976,6 +1976,12 @@ static int domain_context_mapping_one(struct
dmar_domain *domain, pds = context_get_sm_pds(table);
context->lo = (u64)virt_to_phys(table->table) |
context_pdts(pds);
+ /*
+ * Scalable-mode PASID directory pointer is not
snooped if the
+ * coherent bit is not set.
+ */
+ if (!ecap_coherent(iommu->ecap))
+ clflush_cache_range(table->table, sizeof(void
*));
pasid directory table is allocated or updated.
is programmed into context entry.