[PATCH v2 2/7] iommu/vt-d: Set domain type for a private domain
From: Lu Baolu
Date: Tue Jun 11 2019 - 20:40:48 EST
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@xxxxxxxxxxxxxxx>
---
drivers/iommu/intel-iommu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index d5a6c8064c56..d1a82039e835 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -3458,6 +3458,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;
}
--
2.17.1