Skip to content
Commit 5398be25 authored by Yi Liu's avatar Yi Liu Committed by Alex Williamson
Browse files

vfio: Move the IOMMU_CAP_CACHE_COHERENCY check in __vfio_register_dev()



The IOMMU_CAP_CACHE_COHERENCY check only applies to the physical devices
that are IOMMU-backed. But it is now in the group code. If want to compile
vfio_group infrastructure out, this check needs to be moved out of the group
code.

Another reason for this change is to fail the device registration for the
physical devices that do not have IOMMU if the group code is not compiled
as the cdev interface does not support such devices.

Suggested-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Tested-by: default avatarZhenzhong Duan <zhenzhong.duan@intel.com>
Tested-by: default avatarYanting Jiang <yanting.jiang@intel.com>
Signed-off-by: default avatarYi Liu <yi.l.liu@intel.com>
Link: https://lore.kernel.org/r/20230718135551.6592-25-yi.l.liu@intel.com
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent b290a05f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment