mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
7d4f46c237
The following patch will add a new vIOMMU allocator that will require this _iommufd_object_alloc to be sharable with IOMMU drivers (and iommufd too). Add a new driver.c file that will be built with CONFIG_IOMMUFD_DRIVER_CORE selected by CONFIG_IOMMUFD, and put the CONFIG_DRIVER under that remaining to be selectable for drivers to build the existing iova_bitmap.c file. Link: https://patch.msgid.link/r/2f4f6e116dc49ffb67ff6c5e8a7a8e789ab9e98e.1730836219.git.nicolinc@nvidia.com Suggested-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
50 lines
1.6 KiB
Plaintext
50 lines
1.6 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config IOMMUFD_DRIVER_CORE
|
|
tristate
|
|
default (IOMMUFD_DRIVER || IOMMUFD) if IOMMUFD!=n
|
|
|
|
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.
|
|
|
|
if IOMMUFD
|
|
config IOMMUFD_VFIO_CONTAINER
|
|
bool "IOMMUFD provides the VFIO container /dev/vfio/vfio"
|
|
depends on VFIO_GROUP && !VFIO_CONTAINER
|
|
default VFIO_GROUP && !VFIO_CONTAINER
|
|
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
|
|
of the native VFIO container, such as peer-to-peer
|
|
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.
|
|
|
|
config IOMMUFD_TEST
|
|
bool "IOMMU Userspace API Test support"
|
|
depends on DEBUG_KERNEL
|
|
depends on FAULT_INJECTION
|
|
depends on RUNTIME_TESTING_MENU
|
|
select IOMMUFD_DRIVER
|
|
default n
|
|
help
|
|
This is dangerous, do not enable unless running
|
|
tools/testing/selftests/iommu
|
|
endif
|