From: Jan Beulich Subject: IOMMU/x86: drop TLB flushes from quarantine_init() hooks 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 Reviewed-by: Paul Durrant Reviewed-by: Roger Pau Monné Reviewed-by: Kevin Tian --- v5: This (previously follow-on) patch is now part of this series. --- a/xen/drivers/passthrough/amd/iommu_map.c +++ b/xen/drivers/passthrough/amd/iommu_map.c @@ -656,8 +656,6 @@ int __init cf_check amd_iommu_quarantine out: spin_unlock(&hd->arch.mapping_lock); - amd_iommu_flush_all_pages(d); - /* Pages leaked in failure case */ return level ? -ENOMEM : 0; } --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -2980,9 +2980,6 @@ static int __init cf_check intel_iommu_q out: spin_unlock(&hd->arch.mapping_lock); - if ( !rc ) - rc = iommu_flush_iotlb_all(d); - /* Pages may be leaked in failure case */ return rc; }