IOMMU/x86: drop TLB flushes from quarantine_init() hooks
authorJan Beulich <jbeulich@suse.com>
Tue, 5 Apr 2022 12:48:58 +0000 (14:48 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 5 Apr 2022 12:48:58 +0000 (14:48 +0200)
The page tables just created aren't hooked up yet anywhere, so there's
nothing that could be present in any TLB, and hence nothing to flush.
Dropping this flush is, at least on the VT-d side, a prereq to per-
device domain ID use when quarantining devices, as dom_io isn't going
to be assigned a DID anymore: The warning in get_iommu_did() would
trigger.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
master commit: 54c5cef49239e2f27ec3b3fc8804bf57aa4bf46d
master date: 2022-04-05 14:19:42 +0200

xen/drivers/passthrough/amd/iommu_map.c
xen/drivers/passthrough/vtd/iommu.c

index cfa53711483a246ecc9a8b73bacee3070d67ef3a..e36595f289a9e20537b833402cb4c7aa252a4fb5 100644 (file)
@@ -654,8 +654,6 @@ int __init amd_iommu_quarantine_init(struct domain *d)
  out:
     spin_unlock(&hd->arch.mapping_lock);
 
-    amd_iommu_flush_all_pages(d);
-
     /* Pages leaked in failure case */
     return level ? -ENOMEM : 0;
 }
index a38fc1a64f1a0f74d98b8252a650164470d2828a..37339aa044c9c12799e02a02622fd1da7b76b5ef 100644 (file)
@@ -2975,9 +2975,6 @@ static int __init intel_iommu_quarantine_init(struct domain *d)
  out:
     spin_unlock(&hd->arch.mapping_lock);
 
-    if ( !rc )
-        rc = iommu_flush_iotlb_all(d);
-
     /* Pages may be leaked in failure case */
     return rc;
 }