iommu/vt-d: Identify default domains replaced with private
authorLu Baolu <baolu.lu@linux.intel.com>
Sat, 25 May 2019 05:41:29 +0000 (13:41 +0800)
committerJoerg Roedel <jroedel@suse.de>
Tue, 28 May 2019 08:19:09 +0000 (10:19 +0200)
commit942067f1b6b97b1e97cd073b0e2815bc499656db
tree2d0d379ebe01506ac28abc04cc0a956636649c8f
parentfa954e683178949e3c50a7d40c176e7b951bb22d
iommu/vt-d: Identify default domains replaced with private

When we put a device into an iommu group, the group's default
domain will be attached to the device. There are some corner
cases where the type (identity or dma) of the default domain
doesn't work for the device and the request of a new default
domain results in failure (e.x. multiple devices have already
existed in the group). In order to be compatible with the past,
we used a private domain. Mark the private domains and disallow
some iommu apis (map/unmap/iova_to_phys) on them.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c