Skip to content

Commit

Permalink
iommu/vt-d: Set domain type for a private domain
Browse files Browse the repository at this point in the history
Otherwise, domain_get_iommu() will be broken.

Fixes: 942067f ("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>
  • Loading branch information
Lu Baolu authored and Joerg Roedel committed Jun 12, 2019
1 parent f4c63ea commit c57b260
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c57b260

Please sign in to comment.