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
98 select NEED_SG_DMA_LENGTH
101 bool "Freescale IOMMU support"
103 depends on PHYS_64BIT
104 depends on PPC_E500MC || (COMPILE_TEST && PPC)
106 select GENERIC_ALLOCATOR
108 Freescale PAMU support. PAMU is the IOMMU present on Freescale QorIQ platforms.
109 PAMU can authorize memory access, remap the memory address, and remap I/O
114 bool "MSM IOMMU Support"
116 depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST
118 select IOMMU_IO_PGTABLE_ARMV7S
120 Support for the IOMMUs found on certain Qualcomm SOCs.
121 These IOMMUs allow virtualization of the address space used by most
122 cores within the multimedia subsystem.
124 If unsure, say N here.
126 config IOMMU_PGTABLES_L2
128 depends on MSM_IOMMU && MMU && SMP && CPU_DCACHE_DISABLE=n
132 bool "AMD IOMMU support"
140 depends on X86_64 && PCI && ACPI
142 With this option you can enable support for AMD IOMMU hardware in
143 your system. An IOMMU is a hardware component which provides
144 remapping of DMA memory accesses from devices. With an AMD IOMMU you
145 can isolate the DMA memory of different devices and protect the
146 system from misbehaving device drivers or hardware.
148 You can find out if your system has an AMD IOMMU if you look into
149 your BIOS for an option to enable it or if you have an IVRS ACPI
153 tristate "AMD IOMMU Version 2 driver"
157 This option enables support for the AMD IOMMUv2 features of the IOMMU
158 hardware. Select this option if you want to use devices that support
159 the PCI PRI and PASID interface.
161 config AMD_IOMMU_DEBUGFS
162 bool "Enable AMD IOMMU internals in DebugFS"
163 depends on AMD_IOMMU && IOMMU_DEBUGFS
165 !!!WARNING!!! !!!WARNING!!! !!!WARNING!!! !!!WARNING!!!
167 DO NOT ENABLE THIS OPTION UNLESS YOU REALLY, -REALLY- KNOW WHAT YOU ARE DOING!!!
168 Exposes AMD IOMMU device internals in DebugFS.
170 This option is -NOT- intended for production environments, and should
171 not generally be enabled.
173 # Intel IOMMU support
178 bool "Support for Intel IOMMU using DMA Remapping Devices"
179 depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)
182 select NEED_DMA_MAP_STATE
185 DMA remapping (DMAR) devices support enables independent address
186 translations for Direct Memory Access (DMA) from devices.
187 These DMA remapping devices are reported via ACPI tables
188 and include PCI device scope covered by these DMA
191 config INTEL_IOMMU_DEBUGFS
192 bool "Export Intel IOMMU internals in Debugfs"
193 depends on INTEL_IOMMU && IOMMU_DEBUGFS
197 DO NOT ENABLE THIS OPTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!!!
199 Expose Intel IOMMU internals in Debugfs.
201 This option is -NOT- intended for production environments, and should
202 only be enabled for debugging Intel IOMMU.
204 config INTEL_IOMMU_SVM
205 bool "Support for Shared Virtual Memory with Intel IOMMU"
206 depends on INTEL_IOMMU && X86
210 Shared Virtual Memory (SVM) provides a facility for devices
211 to access DMA resources through process address space by
212 means of a Process Address Space ID (PASID).
214 config INTEL_IOMMU_DEFAULT_ON
216 prompt "Enable Intel DMA Remapping Devices by default"
217 depends on INTEL_IOMMU
219 Selecting this option will enable a DMAR device at boot time if
220 one is found. If this option is not selected, DMAR support can
221 be enabled by passing intel_iommu=on to the kernel.
223 config INTEL_IOMMU_BROKEN_GFX_WA
224 bool "Workaround broken graphics drivers (going away soon)"
225 depends on INTEL_IOMMU && BROKEN && X86
227 Current Graphics drivers tend to use physical address
228 for DMA and avoid using DMA APIs. Setting this config
229 option permits the IOMMU driver to set a unity map for
230 all the OS-visible memory. Hence the driver can continue
231 to use physical addresses for DMA, at least until this
232 option is removed in the 2.6.32 kernel.
234 config INTEL_IOMMU_FLOPPY_WA
236 depends on INTEL_IOMMU && X86
238 Floppy disk drivers are known to bypass DMA API calls
239 thereby failing to work when IOMMU is enabled. This
240 workaround will setup a 1:1 mapping for the first
241 16MiB to make floppy (an ISA device) work.
244 bool "Support for Interrupt Remapping"
245 depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI
248 Supports Interrupt remapping for IO-APIC and MSI devices.
249 To use x2apic mode in the CPU's which support x2APIC enhancements or
250 to support platforms with CPU's having > 8 bit APIC ID, say Y.
254 bool "OMAP IOMMU Support"
255 depends on ARM && MMU
256 depends on ARCH_OMAP2PLUS || COMPILE_TEST
259 The OMAP3 media platform drivers depend on iommu support,
260 if you need them say Y here.
262 config OMAP_IOMMU_DEBUG
263 bool "Export OMAP IOMMU internals in DebugFS"
264 depends on OMAP_IOMMU && DEBUG_FS
266 Select this to see extensive information about
267 the internal state of OMAP IOMMU in debugfs.
269 Say N unless you know you need this.
271 config ROCKCHIP_IOMMU
272 bool "Rockchip IOMMU Support"
273 depends on ARM || ARM64
274 depends on ARCH_ROCKCHIP || COMPILE_TEST
276 select ARM_DMA_USE_IOMMU
278 Support for IOMMUs found on Rockchip rk32xx SOCs.
279 These IOMMUs allow virtualization of the address space used by most
280 cores within the multimedia subsystem.
281 Say Y here if you are using a Rockchip SoC that includes an IOMMU
284 config TEGRA_IOMMU_GART
285 bool "Tegra GART IOMMU Support"
286 depends on ARCH_TEGRA_2x_SOC
290 Enables support for remapping discontiguous physical memory
291 shared with the operating system into contiguous I/O virtual
292 space through the GART (Graphics Address Relocation Table)
293 hardware included on Tegra SoCs.
295 config TEGRA_IOMMU_SMMU
296 bool "NVIDIA Tegra SMMU Support"
297 depends on ARCH_TEGRA
302 This driver supports the IOMMU hardware (SMMU) found on NVIDIA Tegra
303 SoCs (Tegra30 up to Tegra210).
306 bool "Exynos IOMMU Support"
307 depends on ARCH_EXYNOS && MMU
308 depends on !CPU_BIG_ENDIAN # revisit driver if we can enable big-endian ptes
310 select ARM_DMA_USE_IOMMU
312 Support for the IOMMU (System MMU) of Samsung Exynos application
313 processor family. This enables H/W multimedia accelerators to see
314 non-linear physical memory chunks as linear memory in their
317 If unsure, say N here.
319 config EXYNOS_IOMMU_DEBUG
320 bool "Debugging log for Exynos IOMMU"
321 depends on EXYNOS_IOMMU
323 Select this to see the detailed log message that shows what
324 happens in the IOMMU driver.
326 Say N unless you need kernel log message for IOMMU debugging.
329 bool "Renesas VMSA-compatible IPMMU"
330 depends on ARM || IOMMU_DMA
331 depends on ARCH_RENESAS || (COMPILE_TEST && !GENERIC_ATOMIC64)
333 select IOMMU_IO_PGTABLE_LPAE
334 select ARM_DMA_USE_IOMMU
336 Support for the Renesas VMSA-compatible IPMMU found in the R-Mobile
337 APE6, R-Car Gen2, and R-Car Gen3 SoCs.
341 config SPAPR_TCE_IOMMU
342 bool "sPAPR TCE IOMMU Support"
343 depends on PPC_POWERNV || PPC_PSERIES
346 Enables bits of IOMMU API required by VFIO. The iommu_ops
347 is not implemented as it is not necessary for VFIO.
351 bool "ARM Ltd. System MMU (SMMU) Support"
352 depends on (ARM64 || ARM) && MMU
354 select IOMMU_IO_PGTABLE_LPAE
355 select ARM_DMA_USE_IOMMU if ARM
357 Support for implementations of the ARM System MMU architecture
360 Say Y here if your SoC includes an IOMMU device implementing
361 the ARM SMMU architecture.
363 config ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT
364 bool "Default to disabling bypass on ARM SMMU v1 and v2"
368 Say Y here to (by default) disable bypass streams such that
369 incoming transactions from devices that are not attached to
370 an iommu domain will report an abort back to the device and
371 will not be allowed to pass through the SMMU.
373 Any old kernels that existed before this KConfig was
374 introduced would default to _allowing_ bypass (AKA the
375 equivalent of NO for this config). However the default for
376 this option is YES because the old behavior is insecure.
378 There are few reasons to allow unmatched stream bypass, and
379 even fewer good ones. If saying YES here breaks your board
380 you should work on fixing your board. This KConfig option
381 is expected to be removed in the future and we'll simply
382 hardcode the bypass disable in the code.
384 NOTE: the kernel command line parameter
385 'arm-smmu.disable_bypass' will continue to override this
389 bool "ARM Ltd. System MMU Version 3 (SMMUv3) Support"
392 select IOMMU_IO_PGTABLE_LPAE
393 select GENERIC_MSI_IRQ_DOMAIN
395 Support for implementations of the ARM System MMU architecture
396 version 3 providing translation support to a PCIe root complex.
398 Say Y here if your system includes an IOMMU device implementing
399 the ARM SMMUv3 architecture.
402 def_bool y if S390 && PCI
403 depends on S390 && PCI
406 Support for the IOMMU API for s390 PCI devices.
408 config S390_CCW_IOMMU
409 bool "S390 CCW IOMMU Support"
410 depends on S390 && CCW
413 Enables bits of IOMMU API required by VFIO. The iommu_ops
414 is not implemented as it is not necessary for VFIO.
417 bool "S390 AP IOMMU Support"
418 depends on S390 && ZCRYPT
421 Enables bits of IOMMU API required by VFIO. The iommu_ops
422 is not implemented as it is not necessary for VFIO.
425 bool "MTK IOMMU Support"
426 depends on ARM || ARM64
427 depends on ARCH_MEDIATEK || COMPILE_TEST
428 select ARM_DMA_USE_IOMMU
431 select IOMMU_IO_PGTABLE_ARMV7S
435 Support for the M4U on certain Mediatek SOCs. M4U is MultiMedia
436 Memory Management Unit. This option enables remapping of DMA memory
437 accesses for the multimedia subsystem.
439 If unsure, say N here.
442 bool "MTK IOMMU Version 1 (M4U gen1) Support"
444 depends on ARCH_MEDIATEK || COMPILE_TEST
445 select ARM_DMA_USE_IOMMU
450 Support for the M4U on certain Mediatek SoCs. M4U generation 1 HW is
451 Multimedia Memory Managememt Unit. This option enables remapping of
452 DMA memory accesses for the multimedia subsystem.
454 if unsure, say N here.
457 # Note: iommu drivers cannot (yet?) be built as modules
458 bool "Qualcomm IOMMU Support"
459 depends on ARCH_QCOM || (COMPILE_TEST && !GENERIC_ATOMIC64)
461 select IOMMU_IO_PGTABLE_LPAE
462 select ARM_DMA_USE_IOMMU
464 Support for IOMMU on certain Qualcomm SoCs.
467 bool "Hyper-V x2APIC IRQ Handling"
472 Stub IOMMU driver to handle IRQs as to allow Hyper-V Linux
473 guests to run with x2APIC mode enabled.
475 endif # IOMMU_SUPPORT