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 <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: 54c5cef492
master date: 2022-04-05 14:19:42 +0200
This commit is contained in:
Jan Beulich committed 2022-04-05 15:26:41 +02:00
1 parent 7cfe3570b1
commit e6d6b5ba03
2 files changed
+1 -6

No files matched your search

-2
View File
@@ -595,8 +595,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;
}
+1 -4
View File
@@ -2894,7 +2894,6 @@ static int __init intel_iommu_quarantine_init(struct domain *d)
struct dma_pte *parent;
unsigned int agaw = width_to_agaw(DEFAULT_DOMAIN_ADDRESS_WIDTH);
unsigned int level = agaw_to_level(agaw);
int rc;
if ( hd->arch.pgd_maddr )
{
@@ -2941,10 +2940,8 @@ static int __init intel_iommu_quarantine_init(struct domain *d)
out:
spin_unlock(&hd->arch.mapping_lock);
rc = iommu_flush_iotlb_all(d);
/* Pages leaked in failure case */
return level ? -ENOMEM : rc;
return level ? -ENOMEM : 0;
}
const struct iommu_ops __initconstrel intel_iommu_ops = {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.