Commit 31076af
vfio: Remove use of vfio_group_viable()
As DMA ownership is claimed for the iommu group when a VFIO group is
added to a VFIO container, the VFIO group viability is guaranteed as long
as group->container_users > 0. Remove those unnecessary group viability
checks which are only hit when group->container_users is not zero.
The only remaining reference is in GROUP_GET_STATUS, which could be called
at any time when group fd is valid. Here we just replace the
vfio_group_viable() by directly calling IOMMU core to get viability status.
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Link: https://lore.kernel.org/r/20220418005000.897664-9-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>1 parent 70693f4 commit 31076af
1 file changed
Lines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1313 | 1313 | | |
1314 | 1314 | | |
1315 | 1315 | | |
1316 | | - | |
1317 | | - | |
1318 | | - | |
1319 | | - | |
1320 | | - | |
1321 | | - | |
1322 | 1316 | | |
1323 | 1317 | | |
1324 | 1318 | | |
| |||
1328 | 1322 | | |
1329 | 1323 | | |
1330 | 1324 | | |
1331 | | - | |
| 1325 | + | |
1332 | 1326 | | |
1333 | 1327 | | |
1334 | 1328 | | |
| |||
1346 | 1340 | | |
1347 | 1341 | | |
1348 | 1342 | | |
1349 | | - | |
| 1343 | + | |
1350 | 1344 | | |
1351 | 1345 | | |
1352 | 1346 | | |
| |||
1438 | 1432 | | |
1439 | 1433 | | |
1440 | 1434 | | |
1441 | | - | |
1442 | | - | |
1443 | | - | |
1444 | 1435 | | |
1445 | | - | |
| 1436 | + | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
1446 | 1440 | | |
1447 | 1441 | | |
1448 | 1442 | | |
| |||
0 commit comments