1 # SPDX-License-Identifier: GPL-2.0-only
3 tristate "VFIO Non-Privileged userspace driver framework"
5 depends on IOMMUFD || !IOMMUFD
7 select VFIO_GROUP if SPAPR_TCE_IOMMU || IOMMUFD=n
8 select VFIO_DEVICE_CDEV if !VFIO_GROUP
9 select VFIO_CONTAINER if IOMMUFD=n
11 VFIO provides a framework for secure userspace device drivers.
12 See Documentation/driver-api/vfio.rst for more details.
14 If you don't know what to do here, say N.
17 config VFIO_DEVICE_CDEV
18 bool "Support for the VFIO cdev /dev/vfio/devices/vfioX"
19 depends on IOMMUFD && !SPAPR_TCE_IOMMU
22 The VFIO device cdev is another way for userspace to get device
23 access. Userspace gets device fd by opening device cdev under
24 /dev/vfio/devices/vfioX, and then bind the device fd with an iommufd
25 to set up secure DMA context for device access. This interface does
28 If you don't know what to do here, say N.
31 bool "Support for the VFIO group /dev/vfio/$group_id"
34 VFIO group support provides the traditional model for accessing
35 devices through VFIO and is used by the majority of userspace
36 applications and drivers making use of VFIO.
38 If you don't know what to do here, say Y.
41 bool "Support for the VFIO container /dev/vfio/vfio"
42 select VFIO_IOMMU_TYPE1 if MMU && (X86 || S390 || ARM || ARM64)
46 The VFIO container is the classic interface to VFIO for establishing
47 IOMMU mappings. If N is selected here then IOMMUFD must be used to
50 Unless testing IOMMUFD say Y here.
53 config VFIO_IOMMU_TYPE1
57 config VFIO_IOMMU_SPAPR_TCE
59 depends on SPAPR_TCE_IOMMU
64 bool "VFIO No-IOMMU support"
67 VFIO is built on the ability to isolate devices using the IOMMU.
68 Only with an IOMMU can userspace access to DMA capable devices be
69 considered secure. VFIO No-IOMMU mode enables IOMMU groups for
70 devices without IOMMU backing for the purpose of re-using the VFIO
71 infrastructure in a non-secure mode. Use of this mode will result
72 in an unsupportable kernel and will therefore taint the kernel.
73 Device assignment to virtual machines is also not possible with
74 this mode since there is no IOMMU to provide DMA translation.
76 If you don't know what to do here, say N.
83 source "drivers/vfio/pci/Kconfig"
84 source "drivers/vfio/platform/Kconfig"
85 source "drivers/vfio/mdev/Kconfig"
86 source "drivers/vfio/fsl-mc/Kconfig"
87 source "drivers/vfio/cdx/Kconfig"
90 source "virt/lib/Kconfig"