diff options
author | Will Deacon <will.deacon@arm.com> | 2016-02-18 12:05:57 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-02-18 15:02:44 +0000 |
commit | cbf8277ef4562075eb4e3932ccd60cc11ee9454c (patch) | |
tree | 87ad12c98e3264e58b7ad62c972ed8a5e8e1c068 /drivers/iommu/arm-smmu-v3.c | |
parent | bc7f2ce0a7b54ba7703f81995fe434f0926424d2 (diff) | |
download | lwn-cbf8277ef4562075eb4e3932ccd60cc11ee9454c.tar.gz lwn-cbf8277ef4562075eb4e3932ccd60cc11ee9454c.zip |
iommu/arm-smmu: Treat IOMMU_DOMAIN_DMA as bypass for now
Until all upstream devices have their DMA ops swizzled to point at the
SMMU, we need to treat the IOMMU_DOMAIN_DMA domain as bypass to avoid
putting devices into an empty address space when detaching from VFIO.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers/iommu/arm-smmu-v3.c')
-rw-r--r-- | drivers/iommu/arm-smmu-v3.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index d96d45ddf500..4ff73ff64e49 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -1687,7 +1687,12 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev) goto out_unlock; smmu_group->domain = smmu_domain; - smmu_group->ste.bypass = false; + + /* + * FIXME: This should always be "false" once we have IOMMU-backed + * DMA ops for all devices behind the SMMU. + */ + smmu_group->ste.bypass = domain->type == IOMMU_DOMAIN_DMA; ret = arm_smmu_install_ste_for_group(smmu_group); if (IS_ERR_VALUE(ret)) |