Commit a3da1ab
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: 0286300 ("iommu: iommu_group_claim_dma_owner() must always assign a domain")
Reported-by: Eric Farman <[email protected]>
Tested-by: Eric Farman <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Reviewed-by: Kevin Tian <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alex Williamson <[email protected]>1 parent 7ab5e10 commit a3da1ab
1 file changed
+10
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | | - | |
| 930 | + | |
| 931 | + | |
931 | 932 | | |
932 | 933 | | |
933 | 934 | | |
| |||
1001 | 1002 | | |
1002 | 1003 | | |
1003 | 1004 | | |
1004 | | - | |
1005 | | - | |
1006 | | - | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
1007 | 1010 | | |
1008 | 1011 | | |
1009 | 1012 | | |
1010 | 1013 | | |
1011 | 1014 | | |
1012 | 1015 | | |
1013 | 1016 | | |
1014 | | - | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
1015 | 1020 | | |
1016 | 1021 | | |
1017 | 1022 | | |
| |||
0 commit comments