Merge tag 'nfsd-5.14' of git://linux-nfs.org/~bfields/linux
[linux-2.6-microblaze.git] / drivers / iommu / intel / Kconfig
1 # SPDX-License-Identifier: GPL-2.0-only
2 # Intel IOMMU support
3 config DMAR_TABLE
4         bool
5
6 config DMAR_PERF
7         bool
8
9 config 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
28 config INTEL_IOMMU_DEBUGFS
29         bool "Export Intel IOMMU internals in Debugfs"
30         depends on INTEL_IOMMU && IOMMU_DEBUGFS
31         select DMAR_PERF
32         help
33           !!!WARNING!!!
34
35           DO NOT ENABLE THIS OPTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!!!
36
37           Expose Intel IOMMU internals in Debugfs.
38
39           This option is -NOT- intended for production environments, and should
40           only be enabled for debugging Intel IOMMU.
41
42 config INTEL_IOMMU_SVM
43         bool "Support for Shared Virtual Memory with Intel IOMMU"
44         depends on INTEL_IOMMU && X86_64
45         select PCI_PASID
46         select PCI_PRI
47         select MMU_NOTIFIER
48         select IOASID
49         select IOMMU_SVA_LIB
50         help
51           Shared Virtual Memory (SVM) provides a facility for devices
52           to access DMA resources through process address space by
53           means of a Process Address Space ID (PASID).
54
55 config INTEL_IOMMU_DEFAULT_ON
56         def_bool y
57         prompt "Enable Intel DMA Remapping Devices by default"
58         depends on INTEL_IOMMU
59         help
60           Selecting this option will enable a DMAR device at boot time if
61           one is found. If this option is not selected, DMAR support can
62           be enabled by passing intel_iommu=on to the kernel.
63
64 config INTEL_IOMMU_BROKEN_GFX_WA
65         bool "Workaround broken graphics drivers (going away soon)"
66         depends on INTEL_IOMMU && BROKEN && X86
67         help
68           Current Graphics drivers tend to use physical address
69           for DMA and avoid using DMA APIs. Setting this config
70           option permits the IOMMU driver to set a unity map for
71           all the OS-visible memory. Hence the driver can continue
72           to use physical addresses for DMA, at least until this
73           option is removed in the 2.6.32 kernel.
74
75 config INTEL_IOMMU_FLOPPY_WA
76         def_bool y
77         depends on INTEL_IOMMU && X86
78         help
79           Floppy disk drivers are known to bypass DMA API calls
80           thereby failing to work when IOMMU is enabled. This
81           workaround will setup a 1:1 mapping for the first
82           16MiB to make floppy (an ISA device) work.
83
84 config INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON
85         bool "Enable Intel IOMMU scalable mode by default"
86         depends on INTEL_IOMMU
87         help
88           Selecting this option will enable by default the scalable mode if
89           hardware presents the capability. The scalable mode is defined in
90           VT-d 3.0. The scalable mode capability could be checked by reading
91           /sys/devices/virtual/iommu/dmar*/intel-iommu/ecap. If this option
92           is not selected, scalable mode support could also be enabled by
93           passing intel_iommu=sm_on to the kernel. If not sure, please use
94           the default value.