mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 06:33:34 +00:00
vfio/spapr_tce: reject mediated devices
Unlike the the type1 IOMMU backend, the SPAPR one does not contain any support for the magic non-IOMMU backed iommu_group used by mediated devices, so reject them in ->attach_group. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Link: https://lore.kernel.org/r/20210924155705.4258-13-hch@lst.de Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
c3c0fa9d94
commit
8986390414
@ -1246,6 +1246,9 @@ static int tce_iommu_attach_group(void *iommu_data,
|
||||
struct iommu_table_group *table_group;
|
||||
struct tce_iommu_group *tcegrp = NULL;
|
||||
|
||||
if (type == VFIO_EMULATED_IOMMU)
|
||||
return -EINVAL;
|
||||
|
||||
mutex_lock(&container->lock);
|
||||
|
||||
/* pr_debug("tce_vfio: Attaching group #%u to iommu %p\n",
|
||||
|
Loading…
Reference in New Issue
Block a user