vfio/type1: Handle different mdev isolation type
authorLu Baolu <baolu.lu@linux.intel.com>
Fri, 12 Apr 2019 04:13:26 +0000 (12:13 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 12 Apr 2019 11:00:37 +0000 (13:00 +0200)
commitbe068fa236c3d697c77f02f3dc9cd7afeb0538a6
tree63e986d14d52d5a0df7a09988e684c76385a3052
parent7bd50f0cd2fd5e8cc910bc0b7db93681c1d325be
vfio/type1: Handle different mdev isolation type

This adds the support to determine the isolation type
of a mediated device group by checking whether it has
an iommu device. If an iommu device exists, an iommu
domain will be allocated and then attached to the iommu
device. Otherwise, keep the same behavior as it is.

Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Sanjay Kumar <sanjay.k.kumar@intel.com>
Signed-off-by: Liu Yi L <yi.l.liu@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/vfio/vfio_iommu_type1.c