iommu/vt-d: Set domain type for a private domain

Otherwise, domain_get_iommu() will be broken.

Fixes: 942067f1b6 ("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>
This commit is contained in:
Lu Baolu 2019-06-12 08:28:46 +08:00 committed by Joerg Roedel
parent f4c63ea91c
commit c57b260a7d
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}