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