Merge tag 'cxl-fixes-6.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl
[linux-block.git] / drivers / vfio / Kconfig
1 # SPDX-License-Identifier: GPL-2.0-only
2 menuconfig 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
14 if VFIO
15 config 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
26 if VFIO_CONTAINER
27 config VFIO_IOMMU_TYPE1
28         tristate
29         default n
30
31 config VFIO_IOMMU_SPAPR_TCE
32         tristate
33         depends on SPAPR_TCE_IOMMU
34         default VFIO
35 endif
36
37 config 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
51 config VFIO_VIRQFD
52         bool
53         select EVENTFD
54         default n
55
56 source "drivers/vfio/pci/Kconfig"
57 source "drivers/vfio/platform/Kconfig"
58 source "drivers/vfio/mdev/Kconfig"
59 source "drivers/vfio/fsl-mc/Kconfig"
60 endif
61
62 source "virt/lib/Kconfig"