On Thu, 19 May 2022 14:03:48 -0300 Jason Gunthorpe <j...@nvidia.com> wrote:
> 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 <far...@linux.ibm.com> > Tested-by: Eric Farman <far...@linux.ibm.com> > Signed-off-by: Jason Gunthorpe <j...@nvidia.com> > --- > drivers/vfio/vfio.c | 15 ++++++++++----- > 1 file changed, 10 insertions(+), 5 deletions(-) Applied to vfio next branch for v5.19. Thanks, Alex _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu