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