Skip to content

Commit 3b498b6

Browse files
rmurphy-armawilliam
authored andcommitted
vfio: Use device_iommu_capable()
Use the new interface to check the capabilities for our device specifically. Reviewed-by: Lu Baolu <[email protected]> Signed-off-by: Robin Murphy <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/4ea5eb64246f1ee188d1a61c3e93b37756932eb7.1656092606.git.robin.murphy@arm.com Signed-off-by: Alex Williamson <[email protected]>
1 parent eed20c7 commit 3b498b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/vfio/vfio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ int vfio_register_group_dev(struct vfio_device *device)
605605
* VFIO always sets IOMMU_CACHE because we offer no way for userspace to
606606
* restore cache coherency.
607607
*/
608-
if (!iommu_capable(device->dev->bus, IOMMU_CAP_CACHE_COHERENCY))
608+
if (!device_iommu_capable(device->dev, IOMMU_CAP_CACHE_COHERENCY))
609609
return -EINVAL;
610610

611611
return __vfio_register_dev(device,

0 commit comments

Comments
 (0)