Skip to content

Commit e805522

Browse files
LuBaolujoergroedel
authored andcommitted
iommu/vt-d: Remove domain_update_iommu_snooping()
The IOMMU force snooping capability is not required to be consistent among all the IOMMUs anymore. Remove force snooping capability check in the IOMMU hot-add path and domain_update_iommu_snooping() becomes a dead code now. Signed-off-by: Lu Baolu <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent fc0051c commit e805522

File tree

1 file changed

+1
-33
lines changed

1 file changed

+1
-33
lines changed

drivers/iommu/intel/iommu.c

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -533,33 +533,6 @@ static void domain_update_iommu_coherency(struct dmar_domain *domain)
533533
rcu_read_unlock();
534534
}
535535

536-
static bool domain_update_iommu_snooping(struct intel_iommu *skip)
537-
{
538-
struct dmar_drhd_unit *drhd;
539-
struct intel_iommu *iommu;
540-
bool ret = true;
541-
542-
rcu_read_lock();
543-
for_each_active_iommu(iommu, drhd) {
544-
if (iommu != skip) {
545-
/*
546-
* If the hardware is operating in the scalable mode,
547-
* the snooping control is always supported since we
548-
* always set PASID-table-entry.PGSNP bit if the domain
549-
* is managed outside (UNMANAGED).
550-
*/
551-
if (!sm_supported(iommu) &&
552-
!ecap_sc_support(iommu->ecap)) {
553-
ret = false;
554-
break;
555-
}
556-
}
557-
}
558-
rcu_read_unlock();
559-
560-
return ret;
561-
}
562-
563536
static int domain_update_iommu_superpage(struct dmar_domain *domain,
564537
struct intel_iommu *skip)
565538
{
@@ -3572,12 +3545,7 @@ static int intel_iommu_add(struct dmar_drhd_unit *dmaru)
35723545
iommu->name);
35733546
return -ENXIO;
35743547
}
3575-
if (!ecap_sc_support(iommu->ecap) &&
3576-
domain_update_iommu_snooping(iommu)) {
3577-
pr_warn("%s: Doesn't support snooping.\n",
3578-
iommu->name);
3579-
return -ENXIO;
3580-
}
3548+
35813549
sp = domain_update_iommu_superpage(NULL, iommu) - 1;
35823550
if (sp >= 0 && !(cap_super_page_val(iommu->cap) & (1 << sp))) {
35833551
pr_warn("%s: Doesn't support large page.\n",

0 commit comments

Comments
 (0)