diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2022-05-19 19:03:48 +0200 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2022-05-23 18:27:43 +0200 |
commit | a3da1ab6fbea7d5cbcb796f62c8771d8ebd7282a (patch) | |
tree | 2964b347cc8c4fdfd3441df34ddfc02d8d6e52a9 /drivers/vfio/pci/mlx5/main.c | |
parent | vfio/pci: Move the unused device into low power state with runtime PM (diff) | |
download | linux-a3da1ab6fbea7d5cbcb796f62c8771d8ebd7282a.tar.xz linux-a3da1ab6fbea7d5cbcb796f62c8771d8ebd7282a.zip |
vfio: Do not manipulate iommu dma_owner for fake iommu groups
Since asserting dma ownership now causes the group to have its DMA blocked
the iommu layer requires a working iommu. This means the dma_owner APIs
cannot be used on the fake groups that VFIO creates. Test for this and
avoid calling them.
Otherwise asserting dma ownership will fail for VFIO mdev devices as a
BLOCKING iommu_domain cannot be allocated due to the NULL iommu ops.
Fixes: 0286300e6045 ("iommu: iommu_group_claim_dma_owner() must always assign a domain")
Reported-by: Eric Farman <farman@linux.ibm.com>
Tested-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/0-v1-9cfc47edbcd4+13546-vfio_dma_owner_fix_jgg@nvidia.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/pci/mlx5/main.c')
0 files changed, 0 insertions, 0 deletions