1 # The IOVA library may also be used by non-IOMMU_API users
5 # IOMMU_API always gets selected by whoever wants it.
9 menuconfig IOMMU_SUPPORT
10 bool "IOMMU Hardware Support"
14 Say Y here if you want to compile device drivers for IO Memory
15 Management Units into the kernel. These devices usually allow to
16 remap DMA requests and/or remap interrupts from other devices on the
21 menu "Generic IOMMU Pagetable Support"
23 # Selected by the actual pagetable implementations
24 config IOMMU_IO_PGTABLE
27 config IOMMU_IO_PGTABLE_LPAE
28 bool "ARMv7/v8 Long Descriptor Format"
29 select IOMMU_IO_PGTABLE
30 depends on ARM || ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64)
32 Enable support for the ARM long descriptor pagetable format.
33 This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page
34 sizes at both stage-1 and stage-2, as well as address spaces
35 up to 48-bits in size.
37 config IOMMU_IO_PGTABLE_LPAE_SELFTEST
39 depends on IOMMU_IO_PGTABLE_LPAE
41 Enable self-tests for LPAE page table allocator. This performs
42 a series of page-table consistency checks during boot.
44 If unsure, say N here.
46 config IOMMU_IO_PGTABLE_ARMV7S
47 bool "ARMv7/v8 Short Descriptor Format"
48 select IOMMU_IO_PGTABLE
49 depends on ARM || ARM64 || COMPILE_TEST
51 Enable support for the ARM Short-descriptor pagetable format.
52 This supports 32-bit virtual and physical addresses mapped using
53 2-level tables with 4KB pages/1MB sections, and contiguous entries
54 for 64KB pages/16MB supersections if indicated by the IOMMU driver.
56 config IOMMU_IO_PGTABLE_ARMV7S_SELFTEST
57 bool "ARMv7s selftests"
58 depends on IOMMU_IO_PGTABLE_ARMV7S
60 Enable self-tests for ARMv7s page table allocator. This performs
61 a series of page-table consistency checks during boot.
63 If unsure, say N here.
68 bool "Export IOMMU internals in DebugFS"
71 Allows exposure of IOMMU device internals. This option enables
72 the use of debugfs by IOMMU drivers as required. Devices can,
73 at initialization time, cause the IOMMU code to create a top-level
74 debug/iommu directory, and then populate a subdirectory with
77 config IOMMU_DEFAULT_PASSTHROUGH
78 bool "IOMMU passthrough by default"
81 Enable passthrough by default, removing the need to pass in
82 iommu.passthrough=on or iommu=pt through command line. If this
83 is enabled, you can still disable with iommu.passthrough=off
84 or iommu=nopt depending on the architecture.
86 If unsure, say N here.
90 depends on OF && IOMMU_API
92 # IOMMU-agnostic DMA-mapping layer
97 select NEED_SG_DMA_LENGTH
100 bool "Freescale IOMMU support"
102 depends on PHYS_64BIT
103 depends on PPC_E500MC || (COMPILE_TEST && PPC)
105 select GENERIC_ALLOCATOR
107 Freescale PAMU support. PAMU is the IOMMU present on Freescale QorIQ platforms.
108 PAMU can authorize memory access, remap the memory address, and remap I/O
113 bool "MSM IOMMU Support"
115 depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST
117 select IOMMU_IO_PGTABLE_ARMV7S
119 Support for the IOMMUs found on certain Qualcomm SOCs.
120 These IOMMUs allow virtualization of the address space used by most
121 cores within the multimedia subsystem.
123 If unsure, say N here.
125 config IOMMU_PGTABLES_L2
127 depends on MSM_IOMMU && MMU && SMP && CPU_DCACHE_DISABLE=n
131 bool "AMD IOMMU support"
139 depends on X86_64 && PCI && ACPI
141 With this option you can enable support for AMD IOMMU hardware in
142 your system. An IOMMU is a hardware component which provides
143 remapping of DMA memory accesses from devices. With an AMD IOMMU you
144 can isolate the DMA memory of different devices and protect the
145 system from misbehaving device drivers or hardware.
147 You can find out if your system has an AMD IOMMU if you look into
148 your BIOS for an option to enable it or if you have an IVRS ACPI
152 tristate "AMD IOMMU Version 2 driver"
156 This option enables support for the AMD IOMMUv2 features of the IOMMU
157 hardware. Select this option if you want to use devices that support
158 the PCI PRI and PASID interface.
160 config AMD_IOMMU_DEBUGFS
161 bool "Enable AMD IOMMU internals in DebugFS"
162 depends on AMD_IOMMU && IOMMU_DEBUGFS
164 !!!WARNING!!! !!!WARNING!!! !!!WARNING!!! !!!WARNING!!!
166 DO NOT ENABLE THIS OPTION UNLESS YOU REALLY, -REALLY- KNOW WHAT YOU ARE DOING!!!
167 Exposes AMD IOMMU device internals in DebugFS.
169 This option is -NOT- intended for production environments, and should
170 not generally be enabled.
172 # Intel IOMMU support
177 bool "Support for Intel IOMMU using DMA Remapping Devices"
178 depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)
181 select NEED_DMA_MAP_STATE
184 DMA remapping (DMAR) devices support enables independent address
185 translations for Direct Memory Access (DMA) from devices.
186 These DMA remapping devices are reported via ACPI tables
187 and include PCI device scope covered by these DMA
190 config INTEL_IOMMU_DEBUGFS
191 bool "Export Intel IOMMU internals in Debugfs"
192 depends on INTEL_IOMMU && IOMMU_DEBUGFS
196 DO NOT ENABLE THIS OPTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!!!
198 Expose Intel IOMMU internals in Debugfs.
200 This option is -NOT- intended for production environments, and should
201 only be enabled for debugging Intel IOMMU.
203 config INTEL_IOMMU_SVM
204 bool "Support for Shared Virtual Memory with Intel IOMMU"
205 depends on INTEL_IOMMU && X86
209 Shared Virtual Memory (SVM) provides a facility for devices
210 to access DMA resources through process address space by
211 means of a Process Address Space ID (PASID).
213 config INTEL_IOMMU_DEFAULT_ON
215 prompt "Enable Intel DMA Remapping Devices by default"
216 depends on INTEL_IOMMU
218 Selecting this option will enable a DMAR device at boot time if
219 one is found. If this option is not selected, DMAR support can
220 be enabled by passing intel_iommu=on to the kernel.
222 config INTEL_IOMMU_BROKEN_GFX_WA
223 bool "Workaround broken graphics drivers (going away soon)"
224 depends on INTEL_IOMMU && BROKEN && X86
226 Current Graphics drivers tend to use physical address
227 for DMA and avoid using DMA APIs. Setting this config
228 option permits the IOMMU driver to set a unity map for
229 all the OS-visible memory. Hence the driver can continue
230 to use physical addresses for DMA, at least until this
231 option is removed in the 2.6.32 kernel.
233 config INTEL_IOMMU_FLOPPY_WA
235 depends on INTEL_IOMMU && X86
237 Floppy disk drivers are known to bypass DMA API calls
238 thereby failing to work when IOMMU is enabled. This
239 workaround will setup a 1:1 mapping for the first
240 16MiB to make floppy (an ISA device) work.
243 bool "Support for Interrupt Remapping"
244 depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI
247 Supports Interrupt remapping for IO-APIC and MSI devices.
248 To use x2apic mode in the CPU's which support x2APIC enhancements or
249 to support platforms with CPU's having > 8 bit APIC ID, say Y.
253 bool "OMAP IOMMU Support"
254 depends on ARM && MMU
255 depends on ARCH_OMAP2PLUS || COMPILE_TEST
258 The OMAP3 media platform drivers depend on iommu support,
259 if you need them say Y here.
261 config OMAP_IOMMU_DEBUG
262 bool "Export OMAP IOMMU internals in DebugFS"
263 depends on OMAP_IOMMU && DEBUG_FS
265 Select this to see extensive information about
266 the internal state of OMAP IOMMU in debugfs.
268 Say N unless you know you need this.
270 config ROCKCHIP_IOMMU
271 bool "Rockchip IOMMU Support"
272 depends on ARM || ARM64
273 depends on ARCH_ROCKCHIP || COMPILE_TEST
275 select ARM_DMA_USE_IOMMU
277 Support for IOMMUs found on Rockchip rk32xx SOCs.
278 These IOMMUs allow virtualization of the address space used by most
279 cores within the multimedia subsystem.
280 Say Y here if you are using a Rockchip SoC that includes an IOMMU
283 config TEGRA_IOMMU_GART
284 bool "Tegra GART IOMMU Support"
285 depends on ARCH_TEGRA_2x_SOC
289 Enables support for remapping discontiguous physical memory
290 shared with the operating system into contiguous I/O virtual
291 space through the GART (Graphics Address Relocation Table)
292 hardware included on Tegra SoCs.
294 config TEGRA_IOMMU_SMMU
295 bool "NVIDIA Tegra SMMU Support"
296 depends on ARCH_TEGRA
301 This driver supports the IOMMU hardware (SMMU) found on NVIDIA Tegra
302 SoCs (Tegra30 up to Tegra210).
305 bool "Exynos IOMMU Support"
306 depends on ARCH_EXYNOS && MMU
307 depends on !CPU_BIG_ENDIAN # revisit driver if we can enable big-endian ptes
309 select ARM_DMA_USE_IOMMU
311 Support for the IOMMU (System MMU) of Samsung Exynos application
312 processor family. This enables H/W multimedia accelerators to see
313 non-linear physical memory chunks as linear memory in their
316 If unsure, say N here.
318 config EXYNOS_IOMMU_DEBUG
319 bool "Debugging log for Exynos IOMMU"
320 depends on EXYNOS_IOMMU
322 Select this to see the detailed log message that shows what
323 happens in the IOMMU driver.
325 Say N unless you need kernel log message for IOMMU debugging.
328 bool "Renesas VMSA-compatible IPMMU"
329 depends on ARM || IOMMU_DMA
330 depends on ARCH_RENESAS || (COMPILE_TEST && !GENERIC_ATOMIC64)
332 select IOMMU_IO_PGTABLE_LPAE
333 select ARM_DMA_USE_IOMMU
335 Support for the Renesas VMSA-compatible IPMMU found in the R-Mobile
336 APE6, R-Car Gen2, and R-Car Gen3 SoCs.
340 config SPAPR_TCE_IOMMU
341 bool "sPAPR TCE IOMMU Support"
342 depends on PPC_POWERNV || PPC_PSERIES
345 Enables bits of IOMMU API required by VFIO. The iommu_ops
346 is not implemented as it is not necessary for VFIO.
350 bool "ARM Ltd. System MMU (SMMU) Support"
351 depends on (ARM64 || ARM) && MMU
353 select IOMMU_IO_PGTABLE_LPAE
354 select ARM_DMA_USE_IOMMU if ARM
356 Support for implementations of the ARM System MMU architecture
359 Say Y here if your SoC includes an IOMMU device implementing
360 the ARM SMMU architecture.
362 config ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT
363 bool "Default to disabling bypass on ARM SMMU v1 and v2"
367 Say Y here to (by default) disable bypass streams such that
368 incoming transactions from devices that are not attached to
369 an iommu domain will report an abort back to the device and
370 will not be allowed to pass through the SMMU.
372 Any old kernels that existed before this KConfig was
373 introduced would default to _allowing_ bypass (AKA the
374 equivalent of NO for this config). However the default for
375 this option is YES because the old behavior is insecure.
377 There are few reasons to allow unmatched stream bypass, and
378 even fewer good ones. If saying YES here breaks your board
379 you should work on fixing your board. This KConfig option
380 is expected to be removed in the future and we'll simply
381 hardcode the bypass disable in the code.
383 NOTE: the kernel command line parameter
384 'arm-smmu.disable_bypass' will continue to override this
388 bool "ARM Ltd. System MMU Version 3 (SMMUv3) Support"
391 select IOMMU_IO_PGTABLE_LPAE
392 select GENERIC_MSI_IRQ_DOMAIN
394 Support for implementations of the ARM System MMU architecture
395 version 3 providing translation support to a PCIe root complex.
397 Say Y here if your system includes an IOMMU device implementing
398 the ARM SMMUv3 architecture.
401 def_bool y if S390 && PCI
402 depends on S390 && PCI
405 Support for the IOMMU API for s390 PCI devices.
407 config S390_CCW_IOMMU
408 bool "S390 CCW IOMMU Support"
409 depends on S390 && CCW
412 Enables bits of IOMMU API required by VFIO. The iommu_ops
413 is not implemented as it is not necessary for VFIO.
416 bool "S390 AP IOMMU Support"
417 depends on S390 && ZCRYPT
420 Enables bits of IOMMU API required by VFIO. The iommu_ops
421 is not implemented as it is not necessary for VFIO.
424 bool "MTK IOMMU Support"
425 depends on ARM || ARM64
426 depends on ARCH_MEDIATEK || COMPILE_TEST
427 select ARM_DMA_USE_IOMMU
430 select IOMMU_IO_PGTABLE_ARMV7S
434 Support for the M4U on certain Mediatek SOCs. M4U is MultiMedia
435 Memory Management Unit. This option enables remapping of DMA memory
436 accesses for the multimedia subsystem.
438 If unsure, say N here.
441 bool "MTK IOMMU Version 1 (M4U gen1) Support"
443 depends on ARCH_MEDIATEK || COMPILE_TEST
444 select ARM_DMA_USE_IOMMU
449 Support for the M4U on certain Mediatek SoCs. M4U generation 1 HW is
450 Multimedia Memory Managememt Unit. This option enables remapping of
451 DMA memory accesses for the multimedia subsystem.
453 if unsure, say N here.
456 # Note: iommu drivers cannot (yet?) be built as modules
457 bool "Qualcomm IOMMU Support"
458 depends on ARCH_QCOM || (COMPILE_TEST && !GENERIC_ATOMIC64)
460 select IOMMU_IO_PGTABLE_LPAE
461 select ARM_DMA_USE_IOMMU
463 Support for IOMMU on certain Qualcomm SoCs.
466 bool "Hyper-V x2APIC IRQ Handling"
471 Stub IOMMU driver to handle IRQs as to allow Hyper-V Linux
472 guests to run with x2APIC mode enabled.
474 endif # IOMMU_SUPPORT