162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ciconfig IOMMUFD 362306a36Sopenharmony_ci tristate "IOMMU Userspace API" 462306a36Sopenharmony_ci select INTERVAL_TREE 562306a36Sopenharmony_ci select INTERVAL_TREE_SPAN_ITER 662306a36Sopenharmony_ci select IOMMU_API 762306a36Sopenharmony_ci default n 862306a36Sopenharmony_ci help 962306a36Sopenharmony_ci Provides /dev/iommu, the user API to control the IOMMU subsystem as 1062306a36Sopenharmony_ci it relates to managing IO page tables that point at user space memory. 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci If you don't know what to do here, say N. 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ciif IOMMUFD 1562306a36Sopenharmony_ciconfig IOMMUFD_VFIO_CONTAINER 1662306a36Sopenharmony_ci bool "IOMMUFD provides the VFIO container /dev/vfio/vfio" 1762306a36Sopenharmony_ci depends on VFIO_GROUP && !VFIO_CONTAINER 1862306a36Sopenharmony_ci default VFIO_GROUP && !VFIO_CONTAINER 1962306a36Sopenharmony_ci help 2062306a36Sopenharmony_ci IOMMUFD will provide /dev/vfio/vfio instead of VFIO. This relies on 2162306a36Sopenharmony_ci IOMMUFD providing compatibility emulation to give the same ioctls. 2262306a36Sopenharmony_ci It provides an option to build a kernel with legacy VFIO components 2362306a36Sopenharmony_ci removed. 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci IOMMUFD VFIO container emulation is known to lack certain features 2662306a36Sopenharmony_ci of the native VFIO container, such as peer-to-peer 2762306a36Sopenharmony_ci DMA mapping, PPC IOMMU support, as well as other potentially 2862306a36Sopenharmony_ci undiscovered gaps. This option is currently intended for the 2962306a36Sopenharmony_ci purpose of testing IOMMUFD with unmodified userspace supporting VFIO 3062306a36Sopenharmony_ci and making use of the Type1 VFIO IOMMU backend. General purpose 3162306a36Sopenharmony_ci enabling of this option is currently discouraged. 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci Unless testing IOMMUFD, say N here. 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ciconfig IOMMUFD_TEST 3662306a36Sopenharmony_ci bool "IOMMU Userspace API Test support" 3762306a36Sopenharmony_ci depends on DEBUG_KERNEL 3862306a36Sopenharmony_ci depends on FAULT_INJECTION 3962306a36Sopenharmony_ci depends on RUNTIME_TESTING_MENU 4062306a36Sopenharmony_ci default n 4162306a36Sopenharmony_ci help 4262306a36Sopenharmony_ci This is dangerous, do not enable unless running 4362306a36Sopenharmony_ci tools/testing/selftests/iommu 4462306a36Sopenharmony_ciendif 45