101 lines · plain
1# SPDX-License-Identifier: GPL-2.0-only2menuconfig VFIO3 tristate "VFIO Non-Privileged userspace driver framework"4 select IOMMU_API5 depends on IOMMUFD || !IOMMUFD6 select INTERVAL_TREE7 select VFIO_GROUP if SPAPR_TCE_IOMMU || IOMMUFD=n8 select VFIO_DEVICE_CDEV if !VFIO_GROUP9 select VFIO_CONTAINER if IOMMUFD=n10 help11 VFIO provides a framework for secure userspace device drivers.12 See Documentation/driver-api/vfio.rst for more details.13 14 If you don't know what to do here, say N.15 16if VFIO17config VFIO_DEVICE_CDEV18 bool "Support for the VFIO cdev /dev/vfio/devices/vfioX"19 depends on IOMMUFD && !SPAPR_TCE_IOMMU20 default !VFIO_GROUP21 help22 The VFIO device cdev is another way for userspace to get device23 access. Userspace gets device fd by opening device cdev under24 /dev/vfio/devices/vfioX, and then bind the device fd with an iommufd25 to set up secure DMA context for device access. This interface does26 not support noiommu.27 28 If you don't know what to do here, say N.29 30config VFIO_GROUP31 bool "Support for the VFIO group /dev/vfio/$group_id"32 default y33 help34 VFIO group support provides the traditional model for accessing35 devices through VFIO and is used by the majority of userspace36 applications and drivers making use of VFIO.37 38 If you don't know what to do here, say Y.39 40config VFIO_CONTAINER41 bool "Support for the VFIO container /dev/vfio/vfio"42 select VFIO_IOMMU_TYPE1 if MMU && (X86 || S390 || ARM || ARM64)43 depends on VFIO_GROUP44 default y45 help46 The VFIO container is the classic interface to VFIO for establishing47 IOMMU mappings. If N is selected here then IOMMUFD must be used to48 manage the mappings.49 50 Unless testing IOMMUFD say Y here.51 52if VFIO_CONTAINER53config VFIO_IOMMU_TYPE154 tristate55 default n56 57config VFIO_IOMMU_SPAPR_TCE58 tristate59 depends on SPAPR_TCE_IOMMU60 default VFIO61endif62 63config VFIO_NOIOMMU64 bool "VFIO No-IOMMU support"65 depends on VFIO_GROUP66 help67 VFIO is built on the ability to isolate devices using the IOMMU.68 Only with an IOMMU can userspace access to DMA capable devices be69 considered secure. VFIO No-IOMMU mode enables IOMMU groups for70 devices without IOMMU backing for the purpose of re-using the VFIO71 infrastructure in a non-secure mode. Use of this mode will result72 in an unsupportable kernel and will therefore taint the kernel.73 Device assignment to virtual machines is also not possible with74 this mode since there is no IOMMU to provide DMA translation.75 76 If you don't know what to do here, say N.77 78config VFIO_VIRQFD79 bool80 select EVENTFD81 default n82 83config VFIO_DEBUGFS84 bool "Export VFIO internals in DebugFS"85 depends on DEBUG_FS86 help87 Allows exposure of VFIO device internals. This option enables88 the use of debugfs by VFIO drivers as required. The device can89 cause the VFIO code create a top-level debug/vfio directory90 during initialization, and then populate a subdirectory with91 entries as required.92 93source "drivers/vfio/pci/Kconfig"94source "drivers/vfio/platform/Kconfig"95source "drivers/vfio/mdev/Kconfig"96source "drivers/vfio/fsl-mc/Kconfig"97source "drivers/vfio/cdx/Kconfig"98endif99 100source "virt/lib/Kconfig"101