IOMMU/x86: drop TLB flushes from quarantine_init() hooks
authorJan Beulich <jbeulich@suse.com>
Tue, 5 Apr 2022 12:19:42 +0000 (14:19 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 5 Apr 2022 12:19:42 +0000 (14:19 +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>
xen/drivers/passthrough/amd/iommu_map.c
xen/drivers/passthrough/vtd/iommu.c

index 500a176e4783f7a08552785552e9adae28f4a5b3..080ffd41733f10ade6eff137691ebbb1f4c49b8e 100644 (file)
@@ -656,8 +656,6 @@ int __init cf_check 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 870bf465bc48c3dc7ec55a97833cc38a52275391..a00f436467d95f8b73e43b15d900d10c6880e249 100644 (file)
@@ -2975,9 +2975,6 @@ static int __init cf_check 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;
 }