1# SPDX-License-Identifier: GPL-2.0-only 2# Intel IOMMU support 3config DMAR_TABLE 4 bool 5 6config DMAR_PERF 7 bool 8 9config DMAR_DEBUG 10 bool 11 12config INTEL_IOMMU 13 bool "Support for Intel IOMMU using DMA Remapping Devices" 14 depends on PCI_MSI && ACPI && X86 15 select IOMMU_API 16 select GENERIC_PT 17 select IOMMU_PT 18 select IOMMU_PT_X86_64 19 select IOMMU_PT_VTDSS 20 select IOMMU_IOVA 21 select IOMMU_IOPF 22 select IOMMUFD_DRIVER if IOMMUFD 23 select NEED_DMA_MAP_STATE 24 select DMAR_TABLE 25 select SWIOTLB 26 select PCI_ATS 27 select PCI_PRI 28 select PCI_PASID 29 help 30 DMA remapping (DMAR) devices support enables independent address 31 translations for Direct Memory Access (DMA) from devices. 32 These DMA remapping devices are reported via ACPI tables 33 and include PCI device scope covered by these DMA 34 remapping devices. 35 36if INTEL_IOMMU 37 38config INTEL_IOMMU_DEBUGFS 39 bool "Export Intel IOMMU internals in Debugfs" 40 depends on IOMMU_DEBUGFS 41 select DMAR_PERF 42 select DMAR_DEBUG 43 help 44 !!!WARNING!!! 45 46 DO NOT ENABLE THIS OPTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!!! 47 48 Expose Intel IOMMU internals in Debugfs. 49 50 This option is -NOT- intended for production environments, and should 51 only be enabled for debugging Intel IOMMU. 52 53config INTEL_IOMMU_SVM 54 bool "Support for Shared Virtual Memory with Intel IOMMU" 55 depends on X86_64 56 select MMU_NOTIFIER 57 select IOMMU_SVA 58 help 59 Shared Virtual Memory (SVM) provides a facility for devices 60 to access DMA resources through process address space by 61 means of a Process Address Space ID (PASID). 62 63config INTEL_IOMMU_DEFAULT_ON 64 bool "Enable Intel DMA Remapping Devices by default" 65 default y 66 help 67 Selecting this option will enable a DMAR device at boot time if 68 one is found. If this option is not selected, DMAR support can 69 be enabled by passing intel_iommu=on to the kernel. 70 71config INTEL_IOMMU_FLOPPY_WA 72 def_bool y 73 depends on X86 && BLK_DEV_FD 74 help 75 Floppy disk drivers are known to bypass DMA API calls 76 thereby failing to work when IOMMU is enabled. This 77 workaround will setup a 1:1 mapping for the first 78 16MiB to make floppy (an ISA device) work. 79 80config INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON 81 bool "Enable Intel IOMMU scalable mode by default" 82 default y 83 help 84 Selecting this option will enable by default the scalable mode if 85 hardware presents the capability. The scalable mode is defined in 86 VT-d 3.0. The scalable mode capability could be checked by reading 87 /sys/devices/virtual/iommu/dmar*/intel-iommu/ecap. If this option 88 is not selected, scalable mode support could also be enabled by 89 passing intel_iommu=sm_on to the kernel. If not sure, please use 90 the default value. 91 92config INTEL_IOMMU_PERF_EVENTS 93 bool "Intel IOMMU performance events" 94 default y 95 depends on INTEL_IOMMU && PERF_EVENTS 96 help 97 Selecting this option will enable the performance monitoring 98 infrastructure in the Intel IOMMU. It collects information about 99 key events occurring during operation of the remapping hardware, 100 to aid performance tuning and debug. These are available on modern 101 processors which support Intel VT-d 4.0 and later. 102 103endif # INTEL_IOMMU 104