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