From: Lu Baolu Date: Wed, 12 Jun 2019 00:28:46 +0000 (+0800) Subject: iommu/vt-d: Set domain type for a private domain X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c57b260a7d7d60dfbcf794dd9836c1d9fdbf5434;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Joerg Roedel --- 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; }