summaryrefslogtreecommitdiff
path: root/drivers/iommu
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2019-06-12 08:28:46 +0800
committerJoerg Roedel <jroedel@suse.de>2019-06-12 10:36:59 +0200
commitc57b260a7d7d60dfbcf794dd9836c1d9fdbf5434 (patch)
tree7d30373dd97e393c3565e27f010138c6c3960517 /drivers/iommu
parentf4c63ea91c6f6d9a1a3062071ff6cc4910ebb8a9 (diff)
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')
-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;
}