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