Skip to content

Commit b89b660

Browse files
LuBaolujoergroedel
authored andcommitted
iommu/vt-d: Unnecessary to handle default identity domain
The iommu default domain framework has been designed to take care of setting identity default domain type. It's unnecessary to handle this again in the VT-d driver. Hence, remove it. Signed-off-by: Lu Baolu <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
1 parent 9235cb1 commit b89b660

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

drivers/iommu/intel-iommu.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ static int intel_iommu_superpage = 1;
387387
static int iommu_identity_mapping;
388388
static int intel_no_bounce;
389389

390-
#define IDENTMAP_ALL 1
391390
#define IDENTMAP_GFX 2
392391
#define IDENTMAP_AZALIA 4
393392

@@ -3079,8 +3078,7 @@ static int device_def_domain_type(struct device *dev)
30793078
return IOMMU_DOMAIN_DMA;
30803079
}
30813080

3082-
return (iommu_identity_mapping & IDENTMAP_ALL) ?
3083-
IOMMU_DOMAIN_IDENTITY : 0;
3081+
return 0;
30843082
}
30853083

30863084
static void intel_iommu_init_qi(struct intel_iommu *iommu)
@@ -3424,9 +3422,6 @@ static int __init init_dmars(void)
34243422
iommu->flush.flush_iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH);
34253423
}
34263424

3427-
if (iommu_default_passthrough())
3428-
iommu_identity_mapping |= IDENTMAP_ALL;
3429-
34303425
#ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA
34313426
dmar_map_gfx = 0;
34323427
#endif
@@ -5038,7 +5033,7 @@ static int __init platform_optin_force_iommu(void)
50385033
* map for all devices except those marked as being untrusted.
50395034
*/
50405035
if (dmar_disabled)
5041-
iommu_identity_mapping |= IDENTMAP_ALL;
5036+
iommu_set_default_passthrough(false);
50425037

50435038
dmar_disabled = 0;
50445039
no_iommu = 0;

0 commit comments

Comments
 (0)