Kconfig 3.39 KB
Newer Older
1 2 3 4 5
# SPDX-License-Identifier: GPL-2.0-only
# Intel IOMMU support
config DMAR_TABLE
	bool

6 7 8
config DMAR_PERF
	bool

9 10 11
config DMAR_DEBUG
	bool

12 13
config INTEL_IOMMU
	bool "Support for Intel IOMMU using DMA Remapping Devices"
14
	depends on PCI_MSI && ACPI && X86
15
	select DMA_OPS
16 17 18 19 20
	select IOMMU_API
	select IOMMU_IOVA
	select NEED_DMA_MAP_STATE
	select DMAR_TABLE
	select SWIOTLB
21
	select PCI_ATS
22 23
	select PCI_PRI
	select PCI_PASID
24 25 26 27 28 29 30
	help
	  DMA remapping (DMAR) devices support enables independent address
	  translations for Direct Memory Access (DMA) from devices.
	  These DMA remapping devices are reported via ACPI tables
	  and include PCI device scope covered by these DMA
	  remapping devices.

31 32
if INTEL_IOMMU

33 34
config INTEL_IOMMU_DEBUGFS
	bool "Export Intel IOMMU internals in Debugfs"
35
	depends on IOMMU_DEBUGFS
36
	select DMAR_PERF
37
	select DMAR_DEBUG
38 39 40 41 42 43 44 45 46 47 48 49
	help
	  !!!WARNING!!!

	  DO NOT ENABLE THIS OPTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!!!

	  Expose Intel IOMMU internals in Debugfs.

	  This option is -NOT- intended for production environments, and should
	  only be enabled for debugging Intel IOMMU.

config INTEL_IOMMU_SVM
	bool "Support for Shared Virtual Memory with Intel IOMMU"
50
	depends on X86_64
51
	select MMU_NOTIFIER
52
	select IOMMU_SVA
53 54 55 56 57 58
	help
	  Shared Virtual Memory (SVM) provides a facility for devices
	  to access DMA resources through process address space by
	  means of a Process Address Space ID (PASID).

config INTEL_IOMMU_DEFAULT_ON
59 60
	bool "Enable Intel DMA Remapping Devices by default"
	default y
61 62 63 64 65 66 67
	help
	  Selecting this option will enable a DMAR device at boot time if
	  one is found. If this option is not selected, DMAR support can
	  be enabled by passing intel_iommu=on to the kernel.

config INTEL_IOMMU_BROKEN_GFX_WA
	bool "Workaround broken graphics drivers (going away soon)"
68
	depends on BROKEN && X86
69 70 71 72 73 74 75 76 77 78
	help
	  Current Graphics drivers tend to use physical address
	  for DMA and avoid using DMA APIs. Setting this config
	  option permits the IOMMU driver to set a unity map for
	  all the OS-visible memory. Hence the driver can continue
	  to use physical addresses for DMA, at least until this
	  option is removed in the 2.6.32 kernel.

config INTEL_IOMMU_FLOPPY_WA
	def_bool y
79
	depends on X86
80 81 82 83 84 85 86 87
	help
	  Floppy disk drivers are known to bypass DMA API calls
	  thereby failing to work when IOMMU is enabled. This
	  workaround will setup a 1:1 mapping for the first
	  16MiB to make floppy (an ISA device) work.

config INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON
	bool "Enable Intel IOMMU scalable mode by default"
88
	default y
89 90 91 92 93 94 95 96
	help
	  Selecting this option will enable by default the scalable mode if
	  hardware presents the capability. The scalable mode is defined in
	  VT-d 3.0. The scalable mode capability could be checked by reading
	  /sys/devices/virtual/iommu/dmar*/intel-iommu/ecap. If this option
	  is not selected, scalable mode support could also be enabled by
	  passing intel_iommu=sm_on to the kernel. If not sure, please use
	  the default value.
97

98 99 100 101 102 103 104 105 106 107 108
config INTEL_IOMMU_PERF_EVENTS
	def_bool y
	bool "Intel IOMMU performance events"
	depends on INTEL_IOMMU && PERF_EVENTS
	help
	  Selecting this option will enable the performance monitoring
	  infrastructure in the Intel IOMMU. It collects information about
	  key events occurring during operation of the remapping hardware,
	  to aid performance tuning and debug. These are available on modern
	  processors which support Intel VT-d 4.0 and later.

109
endif # INTEL_IOMMU