Skip to content

Commit 5bdd86e

Browse files
LuBaolujoergroedel
authored andcommitted
iommu/vt-d: Remove domain_update_iommu_superpage()
The requirement for consistent super page support across all the IOMMU hardware in the system has been removed. In the past, if a new IOMMU was hot-added and lacked consistent super page capability, the hot-add process would be aborted. However, with the updated attachment semantics, it is now permissible for the super page capability to vary among different IOMMU hardware units. Signed-off-by: Lu Baolu <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent c376a34 commit 5bdd86e

File tree

1 file changed

+1
-38
lines changed

1 file changed

+1
-38
lines changed

drivers/iommu/intel/iommu.c

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -352,36 +352,6 @@ static bool iommu_paging_structure_coherency(struct intel_iommu *iommu)
352352
ecap_smpwc(iommu->ecap) : ecap_coherent(iommu->ecap);
353353
}
354354

355-
static int domain_update_iommu_superpage(struct dmar_domain *domain,
356-
struct intel_iommu *skip)
357-
{
358-
struct dmar_drhd_unit *drhd;
359-
struct intel_iommu *iommu;
360-
int mask = 0x3;
361-
362-
if (!intel_iommu_superpage)
363-
return 0;
364-
365-
/* set iommu_superpage to the smallest common denominator */
366-
rcu_read_lock();
367-
for_each_active_iommu(iommu, drhd) {
368-
if (iommu != skip) {
369-
if (domain && domain->use_first_level) {
370-
if (!cap_fl1gp_support(iommu->cap))
371-
mask = 0x1;
372-
} else {
373-
mask &= cap_super_page_val(iommu->cap);
374-
}
375-
376-
if (!mask)
377-
break;
378-
}
379-
}
380-
rcu_read_unlock();
381-
382-
return fls(mask);
383-
}
384-
385355
/* Return the super pagesize bitmap if supported. */
386356
static unsigned long domain_super_pgsize_bitmap(struct dmar_domain *domain)
387357
{
@@ -2605,20 +2575,13 @@ int dmar_parse_one_satc(struct acpi_dmar_header *hdr, void *arg)
26052575

26062576
static int intel_iommu_add(struct dmar_drhd_unit *dmaru)
26072577
{
2608-
int sp, ret;
26092578
struct intel_iommu *iommu = dmaru->iommu;
2579+
int ret;
26102580

26112581
ret = intel_cap_audit(CAP_AUDIT_HOTPLUG_DMAR, iommu);
26122582
if (ret)
26132583
goto out;
26142584

2615-
sp = domain_update_iommu_superpage(NULL, iommu) - 1;
2616-
if (sp >= 0 && !(cap_super_page_val(iommu->cap) & (1 << sp))) {
2617-
pr_warn("%s: Doesn't support large page.\n",
2618-
iommu->name);
2619-
return -ENXIO;
2620-
}
2621-
26222585
/*
26232586
* Disable translation if already enabled prior to OS handover.
26242587
*/

0 commit comments

Comments
 (0)