summaryrefslogtreecommitdiff
path: root/drivers/iommu/intel-iommu.c
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2019-06-12 03:28:46 +0300
committerJoerg Roedel <jroedel@suse.de>2019-06-12 11:36:59 +0300
commitc57b260a7d7d60dfbcf794dd9836c1d9fdbf5434 (patch)
tree7d30373dd97e393c3565e27f010138c6c3960517 /drivers/iommu/intel-iommu.c
parentf4c63ea91c6f6d9a1a3062071ff6cc4910ebb8a9 (diff)
downloadlinux-c57b260a7d7d60dfbcf794dd9836c1d9fdbf5434.tar.xz
iommu/vt-d: Set domain type for a private domain
Otherwise, domain_get_iommu() will be broken. Fixes: 942067f1b6b97 ("iommu/vt-d: Identify default domains replaced with private") Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel-iommu.c')
-rw-r--r--drivers/iommu/intel-iommu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 60ec58bf6701..862c978d3eb4 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -3494,6 +3494,8 @@ static struct dmar_domain *get_private_domain_for_dev(struct device *dev)
out:
if (!domain)
dev_err(dev, "Allocating domain failed\n");
+ else
+ domain->domain.type = IOMMU_DOMAIN_DMA;
return domain;
}