xref: /openbmc/linux/drivers/iommu/Kconfig (revision 29217a47)
1ab493a0fSOhad Ben-Cohen# IOMMU_API always gets selected by whoever wants it.
2ab493a0fSOhad Ben-Cohenconfig IOMMU_API
3ab493a0fSOhad Ben-Cohen	bool
4b10f127eSOhad Ben-Cohen
568255b62SJoerg Roedelmenuconfig IOMMU_SUPPORT
668255b62SJoerg Roedel	bool "IOMMU Hardware Support"
7e5144c93SArnd Bergmann	depends on MMU
868255b62SJoerg Roedel	default y
968255b62SJoerg Roedel	---help---
1068255b62SJoerg Roedel	  Say Y here if you want to compile device drivers for IO Memory
1168255b62SJoerg Roedel	  Management Units into the kernel. These devices usually allow to
1268255b62SJoerg Roedel	  remap DMA requests and/or remap interrupts from other devices on the
1368255b62SJoerg Roedel	  system.
1468255b62SJoerg Roedel
1568255b62SJoerg Roedelif IOMMU_SUPPORT
1668255b62SJoerg Roedel
17fdb1d7beSWill Deaconmenu "Generic IOMMU Pagetable Support"
18fdb1d7beSWill Deacon
19fdb1d7beSWill Deacon# Selected by the actual pagetable implementations
20fdb1d7beSWill Deaconconfig IOMMU_IO_PGTABLE
21fdb1d7beSWill Deacon	bool
22fdb1d7beSWill Deacon
23e1d3c0fdSWill Deaconconfig IOMMU_IO_PGTABLE_LPAE
24e1d3c0fdSWill Deacon	bool "ARMv7/v8 Long Descriptor Format"
25e1d3c0fdSWill Deacon	select IOMMU_IO_PGTABLE
2648e6f765SGeert Uytterhoeven	depends on ARM || ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64)
27e1d3c0fdSWill Deacon	help
28e1d3c0fdSWill Deacon	  Enable support for the ARM long descriptor pagetable format.
29e1d3c0fdSWill Deacon	  This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page
30e1d3c0fdSWill Deacon	  sizes at both stage-1 and stage-2, as well as address spaces
31e1d3c0fdSWill Deacon	  up to 48-bits in size.
32e1d3c0fdSWill Deacon
33fe4b991dSWill Deaconconfig IOMMU_IO_PGTABLE_LPAE_SELFTEST
34fe4b991dSWill Deacon	bool "LPAE selftests"
35fe4b991dSWill Deacon	depends on IOMMU_IO_PGTABLE_LPAE
36fe4b991dSWill Deacon	help
37fe4b991dSWill Deacon	  Enable self-tests for LPAE page table allocator. This performs
38fe4b991dSWill Deacon	  a series of page-table consistency checks during boot.
39fe4b991dSWill Deacon
40fe4b991dSWill Deacon	  If unsure, say N here.
41fe4b991dSWill Deacon
42e5fc9753SRobin Murphyconfig IOMMU_IO_PGTABLE_ARMV7S
43e5fc9753SRobin Murphy	bool "ARMv7/v8 Short Descriptor Format"
44e5fc9753SRobin Murphy	select IOMMU_IO_PGTABLE
4548e6f765SGeert Uytterhoeven	depends on ARM || ARM64 || COMPILE_TEST
46e5fc9753SRobin Murphy	help
47e5fc9753SRobin Murphy	  Enable support for the ARM Short-descriptor pagetable format.
48e5fc9753SRobin Murphy	  This supports 32-bit virtual and physical addresses mapped using
49e5fc9753SRobin Murphy	  2-level tables with 4KB pages/1MB sections, and contiguous entries
50e5fc9753SRobin Murphy	  for 64KB pages/16MB supersections if indicated by the IOMMU driver.
51e5fc9753SRobin Murphy
52e5fc9753SRobin Murphyconfig IOMMU_IO_PGTABLE_ARMV7S_SELFTEST
53e5fc9753SRobin Murphy	bool "ARMv7s selftests"
54e5fc9753SRobin Murphy	depends on IOMMU_IO_PGTABLE_ARMV7S
55e5fc9753SRobin Murphy	help
56e5fc9753SRobin Murphy	  Enable self-tests for ARMv7s page table allocator. This performs
57e5fc9753SRobin Murphy	  a series of page-table consistency checks during boot.
58e5fc9753SRobin Murphy
59e5fc9753SRobin Murphy	  If unsure, say N here.
60e5fc9753SRobin Murphy
61fdb1d7beSWill Deaconendmenu
62fdb1d7beSWill Deacon
63bad614b2SGary R Hookconfig IOMMU_DEBUGFS
64bad614b2SGary R Hook	bool "Export IOMMU internals in DebugFS"
65bad614b2SGary R Hook	depends on DEBUG_FS
66bad614b2SGary R Hook	help
67bad614b2SGary R Hook	  Allows exposure of IOMMU device internals. This option enables
68bad614b2SGary R Hook	  the use of debugfs by IOMMU drivers as required. Devices can,
69bad614b2SGary R Hook	  at initialization time, cause the IOMMU code to create a top-level
70bad614b2SGary R Hook	  debug/iommu directory, and then populate a subdirectory with
71bad614b2SGary R Hook	  entries as required.
72bad614b2SGary R Hook
7358d11317SOlof Johanssonconfig IOMMU_DEFAULT_PASSTHROUGH
7458d11317SOlof Johansson	bool "IOMMU passthrough by default"
7558d11317SOlof Johansson	depends on IOMMU_API
7658d11317SOlof Johansson        help
7758d11317SOlof Johansson	  Enable passthrough by default, removing the need to pass in
7858d11317SOlof Johansson	  iommu.passthrough=on or iommu=pt through command line. If this
7958d11317SOlof Johansson	  is enabled, you can still disable with iommu.passthrough=off
8058d11317SOlof Johansson	  or iommu=nopt depending on the architecture.
8158d11317SOlof Johansson
8258d11317SOlof Johansson	  If unsure, say N here.
8358d11317SOlof Johansson
84114150d8SRobin Murphyconfig IOMMU_IOVA
8515bbdec3SSakari Ailus	tristate
86114150d8SRobin Murphy
874e0ee78fSHiroshi Doyuconfig OF_IOMMU
884e0ee78fSHiroshi Doyu       def_bool y
897eba1d51SWill Deacon       depends on OF && IOMMU_API
904e0ee78fSHiroshi Doyu
910db2e5d1SRobin Murphy# IOMMU-agnostic DMA-mapping layer
920db2e5d1SRobin Murphyconfig IOMMU_DMA
930db2e5d1SRobin Murphy	bool
940db2e5d1SRobin Murphy	select IOMMU_API
950db2e5d1SRobin Murphy	select IOMMU_IOVA
9659a68eb8SRobin Murphy	select NEED_SG_DMA_LENGTH
970db2e5d1SRobin Murphy
98695093e3SVarun Sethiconfig FSL_PAMU
99695093e3SVarun Sethi	bool "Freescale IOMMU support"
100a4d98fb3SJoerg Roedel	depends on PCI
101af29d9faSJoerg Roedel	depends on PHYS_64BIT
102a0d284d2SAndy Fleming	depends on PPC_E500MC || (COMPILE_TEST && PPC)
103695093e3SVarun Sethi	select IOMMU_API
104695093e3SVarun Sethi	select GENERIC_ALLOCATOR
105695093e3SVarun Sethi	help
106695093e3SVarun Sethi	  Freescale PAMU support. PAMU is the IOMMU present on Freescale QorIQ platforms.
107695093e3SVarun Sethi	  PAMU can authorize memory access, remap the memory address, and remap I/O
108695093e3SVarun Sethi	  transaction types.
109695093e3SVarun Sethi
110b10f127eSOhad Ben-Cohen# MSM IOMMU support
111b10f127eSOhad Ben-Cohenconfig MSM_IOMMU
112b10f127eSOhad Ben-Cohen	bool "MSM IOMMU Support"
113477ab7a1SJoerg Roedel	depends on ARM
114477ab7a1SJoerg Roedel	depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST
115b10f127eSOhad Ben-Cohen	select IOMMU_API
116c9220fbdSSricharan R	select IOMMU_IO_PGTABLE_ARMV7S
117b10f127eSOhad Ben-Cohen	help
118b10f127eSOhad Ben-Cohen	  Support for the IOMMUs found on certain Qualcomm SOCs.
119b10f127eSOhad Ben-Cohen	  These IOMMUs allow virtualization of the address space used by most
120b10f127eSOhad Ben-Cohen	  cores within the multimedia subsystem.
121b10f127eSOhad Ben-Cohen
122b10f127eSOhad Ben-Cohen	  If unsure, say N here.
123b10f127eSOhad Ben-Cohen
124b10f127eSOhad Ben-Cohenconfig IOMMU_PGTABLES_L2
125b10f127eSOhad Ben-Cohen	def_bool y
126b10f127eSOhad Ben-Cohen	depends on MSM_IOMMU && MMU && SMP && CPU_DCACHE_DISABLE=n
12729b68415SOhad Ben-Cohen
12829b68415SOhad Ben-Cohen# AMD IOMMU support
12929b68415SOhad Ben-Cohenconfig AMD_IOMMU
13029b68415SOhad Ben-Cohen	bool "AMD IOMMU support"
13129b68415SOhad Ben-Cohen	select SWIOTLB
13229b68415SOhad Ben-Cohen	select PCI_MSI
13352815b75SJoerg Roedel	select PCI_ATS
13452815b75SJoerg Roedel	select PCI_PRI
13552815b75SJoerg Roedel	select PCI_PASID
13629b68415SOhad Ben-Cohen	select IOMMU_API
137a72c4225SJoerg Roedel	select IOMMU_IOVA
1380dbc6078SThomas Petazzoni	depends on X86_64 && PCI && ACPI
13929b68415SOhad Ben-Cohen	---help---
14029b68415SOhad Ben-Cohen	  With this option you can enable support for AMD IOMMU hardware in
14129b68415SOhad Ben-Cohen	  your system. An IOMMU is a hardware component which provides
14229b68415SOhad Ben-Cohen	  remapping of DMA memory accesses from devices. With an AMD IOMMU you
14359bf8964SMasanari Iida	  can isolate the DMA memory of different devices and protect the
14429b68415SOhad Ben-Cohen	  system from misbehaving device drivers or hardware.
14529b68415SOhad Ben-Cohen
14629b68415SOhad Ben-Cohen	  You can find out if your system has an AMD IOMMU if you look into
14729b68415SOhad Ben-Cohen	  your BIOS for an option to enable it or if you have an IVRS ACPI
14829b68415SOhad Ben-Cohen	  table.
14929b68415SOhad Ben-Cohen
150e3c495c7SJoerg Roedelconfig AMD_IOMMU_V2
151a446e219SKees Cook	tristate "AMD IOMMU Version 2 driver"
152e5cac32cSBorislav Petkov	depends on AMD_IOMMU
1538736b2c3SJoerg Roedel	select MMU_NOTIFIER
154e3c495c7SJoerg Roedel	---help---
155e3c495c7SJoerg Roedel	  This option enables support for the AMD IOMMUv2 features of the IOMMU
156e3c495c7SJoerg Roedel	  hardware. Select this option if you want to use devices that support
15759bf8964SMasanari Iida	  the PCI PRI and PASID interface.
158e3c495c7SJoerg Roedel
1597d0f5fd3SGary R Hookconfig AMD_IOMMU_DEBUGFS
1607d0f5fd3SGary R Hook	bool "Enable AMD IOMMU internals in DebugFS"
1617d0f5fd3SGary R Hook	depends on AMD_IOMMU && IOMMU_DEBUGFS
1627d0f5fd3SGary R Hook	---help---
1637d0f5fd3SGary R Hook	  !!!WARNING!!!  !!!WARNING!!!  !!!WARNING!!!  !!!WARNING!!!
1647d0f5fd3SGary R Hook
1657d0f5fd3SGary R Hook	  DO NOT ENABLE THIS OPTION UNLESS YOU REALLY, -REALLY- KNOW WHAT YOU ARE DOING!!!
1667d0f5fd3SGary R Hook	  Exposes AMD IOMMU device internals in DebugFS.
1677d0f5fd3SGary R Hook
1687d0f5fd3SGary R Hook	  This option is -NOT- intended for production environments, and should
1697d0f5fd3SGary R Hook	  not generally be enabled.
1707d0f5fd3SGary R Hook
171166e9278SOhad Ben-Cohen# Intel IOMMU support
172d3f13810SSuresh Siddhaconfig DMAR_TABLE
173d3f13810SSuresh Siddha	bool
174d3f13810SSuresh Siddha
175d3f13810SSuresh Siddhaconfig INTEL_IOMMU
176d3f13810SSuresh Siddha	bool "Support for Intel IOMMU using DMA Remapping Devices"
177166e9278SOhad Ben-Cohen	depends on PCI_MSI && ACPI && (X86 || IA64_GENERIC)
178166e9278SOhad Ben-Cohen	select IOMMU_API
179114150d8SRobin Murphy	select IOMMU_IOVA
180f616ab59SChristoph Hellwig	select NEED_DMA_MAP_STATE
181d3f13810SSuresh Siddha	select DMAR_TABLE
182166e9278SOhad Ben-Cohen	help
183166e9278SOhad Ben-Cohen	  DMA remapping (DMAR) devices support enables independent address
184166e9278SOhad Ben-Cohen	  translations for Direct Memory Access (DMA) from devices.
185166e9278SOhad Ben-Cohen	  These DMA remapping devices are reported via ACPI tables
186166e9278SOhad Ben-Cohen	  and include PCI device scope covered by these DMA
187166e9278SOhad Ben-Cohen	  remapping devices.
188166e9278SOhad Ben-Cohen
189ee2636b8SSohil Mehtaconfig INTEL_IOMMU_DEBUGFS
190ee2636b8SSohil Mehta	bool "Export Intel IOMMU internals in Debugfs"
191ee2636b8SSohil Mehta	depends on INTEL_IOMMU && IOMMU_DEBUGFS
192ee2636b8SSohil Mehta	help
193ee2636b8SSohil Mehta	  !!!WARNING!!!
194ee2636b8SSohil Mehta
195ee2636b8SSohil Mehta	  DO NOT ENABLE THIS OPTION UNLESS YOU REALLY KNOW WHAT YOU ARE DOING!!!
196ee2636b8SSohil Mehta
197ee2636b8SSohil Mehta	  Expose Intel IOMMU internals in Debugfs.
198ee2636b8SSohil Mehta
199ee2636b8SSohil Mehta	  This option is -NOT- intended for production environments, and should
200ee2636b8SSohil Mehta	  only be enabled for debugging Intel IOMMU.
201ee2636b8SSohil Mehta
2028a94ade4SDavid Woodhouseconfig INTEL_IOMMU_SVM
2038a94ade4SDavid Woodhouse	bool "Support for Shared Virtual Memory with Intel IOMMU"
2048a94ade4SDavid Woodhouse	depends on INTEL_IOMMU && X86
205b16d0cb9SDavid Woodhouse	select PCI_PASID
2062f26e0a9SDavid Woodhouse	select MMU_NOTIFIER
2078a94ade4SDavid Woodhouse	help
2088a94ade4SDavid Woodhouse	  Shared Virtual Memory (SVM) provides a facility for devices
2098a94ade4SDavid Woodhouse	  to access DMA resources through process address space by
2108a94ade4SDavid Woodhouse	  means of a Process Address Space ID (PASID).
2118a94ade4SDavid Woodhouse
212d3f13810SSuresh Siddhaconfig INTEL_IOMMU_DEFAULT_ON
213166e9278SOhad Ben-Cohen	def_bool y
214d3f13810SSuresh Siddha	prompt "Enable Intel DMA Remapping Devices by default"
215d3f13810SSuresh Siddha	depends on INTEL_IOMMU
216166e9278SOhad Ben-Cohen	help
217166e9278SOhad Ben-Cohen	  Selecting this option will enable a DMAR device at boot time if
218166e9278SOhad Ben-Cohen	  one is found. If this option is not selected, DMAR support can
219166e9278SOhad Ben-Cohen	  be enabled by passing intel_iommu=on to the kernel.
220166e9278SOhad Ben-Cohen
221d3f13810SSuresh Siddhaconfig INTEL_IOMMU_BROKEN_GFX_WA
222166e9278SOhad Ben-Cohen	bool "Workaround broken graphics drivers (going away soon)"
223d3f13810SSuresh Siddha	depends on INTEL_IOMMU && BROKEN && X86
224166e9278SOhad Ben-Cohen	---help---
225166e9278SOhad Ben-Cohen	  Current Graphics drivers tend to use physical address
226166e9278SOhad Ben-Cohen	  for DMA and avoid using DMA APIs. Setting this config
227166e9278SOhad Ben-Cohen	  option permits the IOMMU driver to set a unity map for
228166e9278SOhad Ben-Cohen	  all the OS-visible memory. Hence the driver can continue
229166e9278SOhad Ben-Cohen	  to use physical addresses for DMA, at least until this
230166e9278SOhad Ben-Cohen	  option is removed in the 2.6.32 kernel.
231166e9278SOhad Ben-Cohen
232d3f13810SSuresh Siddhaconfig INTEL_IOMMU_FLOPPY_WA
233166e9278SOhad Ben-Cohen	def_bool y
234d3f13810SSuresh Siddha	depends on INTEL_IOMMU && X86
235166e9278SOhad Ben-Cohen	---help---
236166e9278SOhad Ben-Cohen	  Floppy disk drivers are known to bypass DMA API calls
237166e9278SOhad Ben-Cohen	  thereby failing to work when IOMMU is enabled. This
238166e9278SOhad Ben-Cohen	  workaround will setup a 1:1 mapping for the first
239166e9278SOhad Ben-Cohen	  16MiB to make floppy (an ISA device) work.
240166e9278SOhad Ben-Cohen
241d3f13810SSuresh Siddhaconfig IRQ_REMAP
242a446e219SKees Cook	bool "Support for Interrupt Remapping"
243a446e219SKees Cook	depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI
244d3f13810SSuresh Siddha	select DMAR_TABLE
245166e9278SOhad Ben-Cohen	---help---
246166e9278SOhad Ben-Cohen	  Supports Interrupt remapping for IO-APIC and MSI devices.
247166e9278SOhad Ben-Cohen	  To use x2apic mode in the CPU's which support x2APIC enhancements or
248166e9278SOhad Ben-Cohen	  to support platforms with CPU's having > 8 bit APIC ID, say Y.
24968255b62SJoerg Roedel
250fcf3a6efSOhad Ben-Cohen# OMAP IOMMU support
251fcf3a6efSOhad Ben-Cohenconfig OMAP_IOMMU
252fcf3a6efSOhad Ben-Cohen	bool "OMAP IOMMU Support"
253477ab7a1SJoerg Roedel	depends on ARM && MMU
254477ab7a1SJoerg Roedel	depends on ARCH_OMAP2PLUS || COMPILE_TEST
255fcf3a6efSOhad Ben-Cohen	select IOMMU_API
25606b718c0SGerd Hoffmann	---help---
25706b718c0SGerd Hoffmann	  The OMAP3 media platform drivers depend on iommu support,
25806b718c0SGerd Hoffmann	  if you need them say Y here.
259fcf3a6efSOhad Ben-Cohen
260fcf3a6efSOhad Ben-Cohenconfig OMAP_IOMMU_DEBUG
26161c75352SSuman Anna	bool "Export OMAP IOMMU internals in DebugFS"
262baaa7b5dSLaurent Pinchart	depends on OMAP_IOMMU && DEBUG_FS
26361c75352SSuman Anna	---help---
264fcf3a6efSOhad Ben-Cohen	  Select this to see extensive information about
265baaa7b5dSLaurent Pinchart	  the internal state of OMAP IOMMU in debugfs.
266fcf3a6efSOhad Ben-Cohen
267fcf3a6efSOhad Ben-Cohen	  Say N unless you know you need this.
268fcf3a6efSOhad Ben-Cohen
269c68a2921SDaniel Kurtzconfig ROCKCHIP_IOMMU
270c68a2921SDaniel Kurtz	bool "Rockchip IOMMU Support"
2714f1fcfe9SSimon Xue	depends on ARM || ARM64
27211175886SJoerg Roedel	depends on ARCH_ROCKCHIP || COMPILE_TEST
273c68a2921SDaniel Kurtz	select IOMMU_API
274c68a2921SDaniel Kurtz	select ARM_DMA_USE_IOMMU
275c68a2921SDaniel Kurtz	help
276c68a2921SDaniel Kurtz	  Support for IOMMUs found on Rockchip rk32xx SOCs.
277c68a2921SDaniel Kurtz	  These IOMMUs allow virtualization of the address space used by most
278c68a2921SDaniel Kurtz	  cores within the multimedia subsystem.
279c68a2921SDaniel Kurtz	  Say Y here if you are using a Rockchip SoC that includes an IOMMU
280c68a2921SDaniel Kurtz	  device.
281c68a2921SDaniel Kurtz
282d53e54b4SHiroshi DOYUconfig TEGRA_IOMMU_GART
283d53e54b4SHiroshi DOYU	bool "Tegra GART IOMMU Support"
284d53e54b4SHiroshi DOYU	depends on ARCH_TEGRA_2x_SOC
285d53e54b4SHiroshi DOYU	select IOMMU_API
286d53e54b4SHiroshi DOYU	help
287d53e54b4SHiroshi DOYU	  Enables support for remapping discontiguous physical memory
288d53e54b4SHiroshi DOYU	  shared with the operating system into contiguous I/O virtual
289d53e54b4SHiroshi DOYU	  space through the GART (Graphics Address Relocation Table)
290d53e54b4SHiroshi DOYU	  hardware included on Tegra SoCs.
291d53e54b4SHiroshi DOYU
2927a31f6f4SHiroshi DOYUconfig TEGRA_IOMMU_SMMU
29389184651SThierry Reding	bool "NVIDIA Tegra SMMU Support"
29489184651SThierry Reding	depends on ARCH_TEGRA
29589184651SThierry Reding	depends on TEGRA_AHB
29689184651SThierry Reding	depends on TEGRA_MC
2977a31f6f4SHiroshi DOYU	select IOMMU_API
2987a31f6f4SHiroshi DOYU	help
29989184651SThierry Reding	  This driver supports the IOMMU hardware (SMMU) found on NVIDIA Tegra
300588c43a7SThierry Reding	  SoCs (Tegra30 up to Tegra210).
3017a31f6f4SHiroshi DOYU
3022a96536eSKyongHo Choconfig EXYNOS_IOMMU
3032a96536eSKyongHo Cho	bool "Exynos IOMMU Support"
304740a01eeSMarek Szyprowski	depends on ARCH_EXYNOS && MMU
305db3a7fd7SArnd Bergmann	depends on !CPU_BIG_ENDIAN # revisit driver if we can enable big-endian ptes
3062a96536eSKyongHo Cho	select IOMMU_API
3074802c1d0STushar Behera	select ARM_DMA_USE_IOMMU
3082a96536eSKyongHo Cho	help
3092a96536eSKyongHo Cho	  Support for the IOMMU (System MMU) of Samsung Exynos application
3105455d700SSachin Kamat	  processor family. This enables H/W multimedia accelerators to see
3115455d700SSachin Kamat	  non-linear physical memory chunks as linear memory in their
3125455d700SSachin Kamat	  address space.
3132a96536eSKyongHo Cho
3142a96536eSKyongHo Cho	  If unsure, say N here.
3152a96536eSKyongHo Cho
3162a96536eSKyongHo Choconfig EXYNOS_IOMMU_DEBUG
3172a96536eSKyongHo Cho	bool "Debugging log for Exynos IOMMU"
3182a96536eSKyongHo Cho	depends on EXYNOS_IOMMU
3192a96536eSKyongHo Cho	help
3202a96536eSKyongHo Cho	  Select this to see the detailed log message that shows what
3215455d700SSachin Kamat	  happens in the IOMMU driver.
3222a96536eSKyongHo Cho
3235455d700SSachin Kamat	  Say N unless you need kernel log message for IOMMU debugging.
3242a96536eSKyongHo Cho
325d25a2a16SLaurent Pinchartconfig IPMMU_VMSA
326d25a2a16SLaurent Pinchart	bool "Renesas VMSA-compatible IPMMU"
3273ae47292SMagnus Damm	depends on ARM || IOMMU_DMA
328a4aaecccSGuenter Roeck	depends on ARCH_RENESAS || (COMPILE_TEST && !GENERIC_ATOMIC64)
329d25a2a16SLaurent Pinchart	select IOMMU_API
330f20ed39fSLaurent Pinchart	select IOMMU_IO_PGTABLE_LPAE
331d25a2a16SLaurent Pinchart	select ARM_DMA_USE_IOMMU
332d25a2a16SLaurent Pinchart	help
33315021d36SGeert Uytterhoeven	  Support for the Renesas VMSA-compatible IPMMU found in the R-Mobile
33415021d36SGeert Uytterhoeven	  APE6, R-Car Gen2, and R-Car Gen3 SoCs.
335d25a2a16SLaurent Pinchart
336d25a2a16SLaurent Pinchart	  If unsure, say N.
337d25a2a16SLaurent Pinchart
3384e13c1acSAlexey Kardashevskiyconfig SPAPR_TCE_IOMMU
3394e13c1acSAlexey Kardashevskiy	bool "sPAPR TCE IOMMU Support"
3405b25199eSAlexey Kardashevskiy	depends on PPC_POWERNV || PPC_PSERIES
3414e13c1acSAlexey Kardashevskiy	select IOMMU_API
3424e13c1acSAlexey Kardashevskiy	help
3434e13c1acSAlexey Kardashevskiy	  Enables bits of IOMMU API required by VFIO. The iommu_ops
3444e13c1acSAlexey Kardashevskiy	  is not implemented as it is not necessary for VFIO.
3454e13c1acSAlexey Kardashevskiy
34648ec83bcSWill Deacon# ARM IOMMU support
34745ae7cffSWill Deaconconfig ARM_SMMU
34845ae7cffSWill Deacon	bool "ARM Ltd. System MMU (SMMU) Support"
349a20cc76bSJoerg Roedel	depends on (ARM64 || ARM) && MMU
35045ae7cffSWill Deacon	select IOMMU_API
351518f7136SWill Deacon	select IOMMU_IO_PGTABLE_LPAE
35245ae7cffSWill Deacon	select ARM_DMA_USE_IOMMU if ARM
35345ae7cffSWill Deacon	help
35445ae7cffSWill Deacon	  Support for implementations of the ARM System MMU architecture
355518f7136SWill Deacon	  versions 1 and 2.
35645ae7cffSWill Deacon
35745ae7cffSWill Deacon	  Say Y here if your SoC includes an IOMMU device implementing
35845ae7cffSWill Deacon	  the ARM SMMU architecture.
35945ae7cffSWill Deacon
36048ec83bcSWill Deaconconfig ARM_SMMU_V3
36148ec83bcSWill Deacon	bool "ARM Ltd. System MMU Version 3 (SMMUv3) Support"
36208d4ca2aSRobin Murphy	depends on ARM64
36348ec83bcSWill Deacon	select IOMMU_API
36448ec83bcSWill Deacon	select IOMMU_IO_PGTABLE_LPAE
365166bdbd2SMarc Zyngier	select GENERIC_MSI_IRQ_DOMAIN
36648ec83bcSWill Deacon	help
36748ec83bcSWill Deacon	  Support for implementations of the ARM System MMU architecture
36848ec83bcSWill Deacon	  version 3 providing translation support to a PCIe root complex.
36948ec83bcSWill Deacon
37048ec83bcSWill Deacon	  Say Y here if your system includes an IOMMU device implementing
37148ec83bcSWill Deacon	  the ARM SMMUv3 architecture.
37248ec83bcSWill Deacon
3738128f23cSGerald Schaeferconfig S390_IOMMU
3748128f23cSGerald Schaefer	def_bool y if S390 && PCI
3758128f23cSGerald Schaefer	depends on S390 && PCI
3768128f23cSGerald Schaefer	select IOMMU_API
3778128f23cSGerald Schaefer	help
3788128f23cSGerald Schaefer	  Support for the IOMMU API for s390 PCI devices.
3798128f23cSGerald Schaefer
38063f1934dSDong Jia Shiconfig S390_CCW_IOMMU
38163f1934dSDong Jia Shi	bool "S390 CCW IOMMU Support"
38263f1934dSDong Jia Shi	depends on S390 && CCW
38363f1934dSDong Jia Shi	select IOMMU_API
38463f1934dSDong Jia Shi	help
38563f1934dSDong Jia Shi	  Enables bits of IOMMU API required by VFIO. The iommu_ops
38663f1934dSDong Jia Shi	  is not implemented as it is not necessary for VFIO.
38763f1934dSDong Jia Shi
3881fde5734STony Krowiakconfig S390_AP_IOMMU
3891fde5734STony Krowiak	bool "S390 AP IOMMU Support"
3901fde5734STony Krowiak	depends on S390 && ZCRYPT
3911fde5734STony Krowiak	select IOMMU_API
3921fde5734STony Krowiak	help
3931fde5734STony Krowiak	  Enables bits of IOMMU API required by VFIO. The iommu_ops
3941fde5734STony Krowiak	  is not implemented as it is not necessary for VFIO.
3951fde5734STony Krowiak
3960df4fabeSYong Wuconfig MTK_IOMMU
3970df4fabeSYong Wu	bool "MTK IOMMU Support"
3980df4fabeSYong Wu	depends on ARM || ARM64
3990df4fabeSYong Wu	depends on ARCH_MEDIATEK || COMPILE_TEST
4001928832fSArnd Bergmann	select ARM_DMA_USE_IOMMU
4010df4fabeSYong Wu	select IOMMU_API
4020df4fabeSYong Wu	select IOMMU_DMA
4030df4fabeSYong Wu	select IOMMU_IO_PGTABLE_ARMV7S
4040df4fabeSYong Wu	select MEMORY
4050df4fabeSYong Wu	select MTK_SMI
4060df4fabeSYong Wu	help
4070df4fabeSYong Wu	  Support for the M4U on certain Mediatek SOCs. M4U is MultiMedia
4080df4fabeSYong Wu	  Memory Management Unit. This option enables remapping of DMA memory
4090df4fabeSYong Wu	  accesses for the multimedia subsystem.
4100df4fabeSYong Wu
4110df4fabeSYong Wu	  If unsure, say N here.
4120df4fabeSYong Wu
413b17336c5SHonghui Zhangconfig MTK_IOMMU_V1
414b17336c5SHonghui Zhang	bool "MTK IOMMU Version 1 (M4U gen1) Support"
415b17336c5SHonghui Zhang	depends on ARM
416b17336c5SHonghui Zhang	depends on ARCH_MEDIATEK || COMPILE_TEST
417b17336c5SHonghui Zhang	select ARM_DMA_USE_IOMMU
418b17336c5SHonghui Zhang	select IOMMU_API
419b17336c5SHonghui Zhang	select MEMORY
420b17336c5SHonghui Zhang	select MTK_SMI
421b17336c5SHonghui Zhang	help
422b17336c5SHonghui Zhang	  Support for the M4U on certain Mediatek SoCs. M4U generation 1 HW is
423b17336c5SHonghui Zhang	  Multimedia Memory Managememt Unit. This option enables remapping of
424b17336c5SHonghui Zhang	  DMA memory accesses for the multimedia subsystem.
425b17336c5SHonghui Zhang
426b17336c5SHonghui Zhang	  if unsure, say N here.
427b17336c5SHonghui Zhang
4280ae349a0SRob Clarkconfig QCOM_IOMMU
4290ae349a0SRob Clark	# Note: iommu drivers cannot (yet?) be built as modules
4300ae349a0SRob Clark	bool "Qualcomm IOMMU Support"
431a4aaecccSGuenter Roeck	depends on ARCH_QCOM || (COMPILE_TEST && !GENERIC_ATOMIC64)
4320ae349a0SRob Clark	select IOMMU_API
4330ae349a0SRob Clark	select IOMMU_IO_PGTABLE_LPAE
4340ae349a0SRob Clark	select ARM_DMA_USE_IOMMU
4350ae349a0SRob Clark	help
4360ae349a0SRob Clark	  Support for IOMMU on certain Qualcomm SoCs.
4370ae349a0SRob Clark
43829217a47SLan Tianyuconfig HYPERV_IOMMU
43929217a47SLan Tianyu	bool "Hyper-V x2APIC IRQ Handling"
44029217a47SLan Tianyu	depends on HYPERV
44129217a47SLan Tianyu	select IOMMU_API
44229217a47SLan Tianyu	default HYPERV
44329217a47SLan Tianyu	help
44429217a47SLan Tianyu	  Stub IOMMU driver to handle IRQs as to allow Hyper-V Linux
44529217a47SLan Tianyu	  guests to run with x2APIC mode enabled.
44629217a47SLan Tianyu
44768255b62SJoerg Roedelendif # IOMMU_SUPPORT
448