xref: /openbmc/linux/drivers/vfio/Kconfig (revision d56b699d)
1# SPDX-License-Identifier: GPL-2.0-only
2menuconfig VFIO
3	tristate "VFIO Non-Privileged userspace driver framework"
4	select IOMMU_API
5	depends on IOMMUFD || !IOMMUFD
6	select INTERVAL_TREE
7	select VFIO_CONTAINER if IOMMUFD=n
8	help
9	  VFIO provides a framework for secure userspace device drivers.
10	  See Documentation/driver-api/vfio.rst for more details.
11
12	  If you don't know what to do here, say N.
13
14if VFIO
15config VFIO_CONTAINER
16	bool "Support for the VFIO container /dev/vfio/vfio"
17	select VFIO_IOMMU_TYPE1 if MMU && (X86 || S390 || ARM || ARM64)
18	default y
19	help
20	  The VFIO container is the classic interface to VFIO for establishing
21	  IOMMU mappings. If N is selected here then IOMMUFD must be used to
22	  manage the mappings.
23
24	  Unless testing IOMMUFD say Y here.
25
26if VFIO_CONTAINER
27config VFIO_IOMMU_TYPE1
28	tristate
29	default n
30
31config VFIO_IOMMU_SPAPR_TCE
32	tristate
33	depends on SPAPR_TCE_IOMMU
34	default VFIO
35endif
36
37config VFIO_NOIOMMU
38	bool "VFIO No-IOMMU support"
39	help
40	  VFIO is built on the ability to isolate devices using the IOMMU.
41	  Only with an IOMMU can userspace access to DMA capable devices be
42	  considered secure.  VFIO No-IOMMU mode enables IOMMU groups for
43	  devices without IOMMU backing for the purpose of re-using the VFIO
44	  infrastructure in a non-secure mode.  Use of this mode will result
45	  in an unsupportable kernel and will therefore taint the kernel.
46	  Device assignment to virtual machines is also not possible with
47	  this mode since there is no IOMMU to provide DMA translation.
48
49	  If you don't know what to do here, say N.
50
51config VFIO_VIRQFD
52	bool
53	select EVENTFD
54	default n
55
56source "drivers/vfio/pci/Kconfig"
57source "drivers/vfio/platform/Kconfig"
58source "drivers/vfio/mdev/Kconfig"
59source "drivers/vfio/fsl-mc/Kconfig"
60source "drivers/vfio/cdx/Kconfig"
61endif
62
63source "virt/lib/Kconfig"
64