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