2022-11-29 20:29:29 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
config IOMMUFD
|
|
|
|
tristate "IOMMU Userspace API"
|
|
|
|
select INTERVAL_TREE
|
|
|
|
select INTERVAL_TREE_SPAN_ITER
|
|
|
|
select IOMMU_API
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
Provides /dev/iommu, the user API to control the IOMMU subsystem as
|
|
|
|
it relates to managing IO page tables that point at user space memory.
|
|
|
|
|
|
|
|
If you don't know what to do here, say N.
|
2022-11-29 20:29:39 +00:00
|
|
|
|
|
|
|
if IOMMUFD
|
2022-11-29 20:31:55 +00:00
|
|
|
config IOMMUFD_VFIO_CONTAINER
|
|
|
|
bool "IOMMUFD provides the VFIO container /dev/vfio/vfio"
|
2023-07-18 13:55:50 +00:00
|
|
|
depends on VFIO_GROUP && !VFIO_CONTAINER
|
|
|
|
default VFIO_GROUP && !VFIO_CONTAINER
|
2022-11-29 20:31:55 +00:00
|
|
|
help
|
|
|
|
IOMMUFD will provide /dev/vfio/vfio instead of VFIO. This relies on
|
|
|
|
IOMMUFD providing compatibility emulation to give the same ioctls.
|
|
|
|
It provides an option to build a kernel with legacy VFIO components
|
|
|
|
removed.
|
|
|
|
|
|
|
|
IOMMUFD VFIO container emulation is known to lack certain features
|
2023-01-18 17:50:28 +00:00
|
|
|
of the native VFIO container, such as peer-to-peer
|
2022-11-29 20:31:55 +00:00
|
|
|
DMA mapping, PPC IOMMU support, as well as other potentially
|
|
|
|
undiscovered gaps. This option is currently intended for the
|
|
|
|
purpose of testing IOMMUFD with unmodified userspace supporting VFIO
|
|
|
|
and making use of the Type1 VFIO IOMMU backend. General purpose
|
|
|
|
enabling of this option is currently discouraged.
|
|
|
|
|
|
|
|
Unless testing IOMMUFD, say N here.
|
|
|
|
|
2022-11-29 20:29:39 +00:00
|
|
|
config IOMMUFD_TEST
|
|
|
|
bool "IOMMU Userspace API Test support"
|
|
|
|
depends on DEBUG_KERNEL
|
|
|
|
depends on FAULT_INJECTION
|
|
|
|
depends on RUNTIME_TESTING_MENU
|
2024-04-05 00:05:14 +00:00
|
|
|
select IOMMUFD_DRIVER
|
2022-11-29 20:29:39 +00:00
|
|
|
default n
|
|
|
|
help
|
|
|
|
This is dangerous, do not enable unless running
|
|
|
|
tools/testing/selftests/iommu
|
|
|
|
endif
|