linux/drivers/vfio
Jason Gunthorpe c9a397cee9 vfio: Support VFIO_NOIOMMU with iommufd
Add a small amount of emulation to vfio_compat to accept the SET_IOMMU to
VFIO_NOIOMMU_IOMMU and have vfio just ignore iommufd if it is working on a
no-iommu enabled device.

Move the enable_unsafe_noiommu_mode module out of container.c into
vfio_main.c so that it is always available even if VFIO_CONTAINER=n.

This passes Alex's mini-test:

https://github.com/awilliam/tests/blob/master/vfio-noiommu-pci-device-open.c

Link: https://lore.kernel.org/r/0-v3-480cd64a16f7+1ad0-iommufd_noiommu_jgg@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
2023-02-03 15:45:23 -04:00
..
fsl-mc VFIO updates for v6.2-rc1 2022-12-15 13:12:15 -08:00
mdev vfio/mdev: add mdev available instance checking to the core 2022-10-04 12:06:58 -06:00
pci VFIO updates for v6.2-rc1 2022-12-15 13:12:15 -08:00
platform VFIO updates for v6.2-rc1 2022-12-15 13:12:15 -08:00
container.c vfio: Support VFIO_NOIOMMU with iommufd 2023-02-03 15:45:23 -04:00
group.c vfio: Support VFIO_NOIOMMU with iommufd 2023-02-03 15:45:23 -04:00
iommufd.c vfio: Support VFIO_NOIOMMU with iommufd 2023-02-03 15:45:23 -04:00
iova_bitmap.c vfio/iova_bitmap: refactor iova_bitmap_set() to better handle page boundaries 2022-12-02 10:09:25 -07:00
Kconfig vfio: Support VFIO_NOIOMMU with iommufd 2023-02-03 15:45:23 -04:00
Makefile VFIO updates for v6.2-rc1 2022-12-15 13:12:15 -08:00
vfio_iommu_spapr_tce.c vfio: Move vfio_spapr_iommu_eeh_ioctl into vfio_iommu_spapr_tce.c 2022-12-05 12:04:32 -07:00
vfio_iommu_type1.c Merge branches 'apple/dart', 'arm/mediatek', 'arm/omap', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2022-09-26 15:52:31 +02:00
vfio_main.c vfio: Support VFIO_NOIOMMU with iommufd 2023-02-03 15:45:23 -04:00
vfio.h vfio: Support VFIO_NOIOMMU with iommufd 2023-02-03 15:45:23 -04:00
virqfd.c vfio: Fold vfio_virqfd.ko into vfio.ko 2022-12-05 12:04:32 -07:00