xref: /linux/drivers/vfio/Kconfig (revision 07f0148aafe8c95a3a76cd59e9e75b4d78d1d31d)
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
35
36config VFIO_NOIOMMU
37	bool "VFIO No-IOMMU support"
38	help
39	  VFIO is built on the ability to isolate devices using the IOMMU.
40	  Only with an IOMMU can userspace access to DMA capable devices be
41	  considered secure.  VFIO No-IOMMU mode enables IOMMU groups for
42	  devices without IOMMU backing for the purpose of re-using the VFIO
43	  infrastructure in a non-secure mode.  Use of this mode will result
44	  in an unsupportable kernel and will therefore taint the kernel.
45	  Device assignment to virtual machines is also not possible with
46	  this mode since there is no IOMMU to provide DMA translation.
47
48	  If you don't know what to do here, say N.
49endif
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"
60endif
61
62source "virt/lib/Kconfig"
63