Kconfig 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. # The IOVA library may also be used by non-IOMMU_API users
  3. config IOMMU_IOVA
  4. tristate
  5. # The IOASID library may also be used by non-IOMMU_API users
  6. config IOASID
  7. tristate
  8. # IOMMU_API always gets selected by whoever wants it.
  9. config IOMMU_API
  10. bool
  11. menuconfig IOMMU_SUPPORT
  12. bool "IOMMU Hardware Support"
  13. depends on MMU
  14. default y
  15. help
  16. Say Y here if you want to compile device drivers for IO Memory
  17. Management Units into the kernel. These devices usually allow to
  18. remap DMA requests and/or remap interrupts from other devices on the
  19. system.
  20. if IOMMU_SUPPORT
  21. menu "Generic IOMMU Pagetable Support"
  22. # Selected by the actual pagetable implementations
  23. config IOMMU_IO_PGTABLE
  24. bool
  25. config IOMMU_IO_PGTABLE_LPAE
  26. bool "ARMv7/v8 Long Descriptor Format"
  27. select IOMMU_IO_PGTABLE
  28. depends on ARM || ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64)
  29. help
  30. Enable support for the ARM long descriptor pagetable format.
  31. This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page
  32. sizes at both stage-1 and stage-2, as well as address spaces
  33. up to 48-bits in size.
  34. config IOMMU_IO_PGTABLE_LPAE_SELFTEST
  35. bool "LPAE selftests"
  36. depends on IOMMU_IO_PGTABLE_LPAE
  37. help
  38. Enable self-tests for LPAE page table allocator. This performs
  39. a series of page-table consistency checks during boot.
  40. If unsure, say N here.
  41. config IOMMU_IO_PGTABLE_FAST
  42. bool "Fast ARMv7/v8 Long Descriptor Format"
  43. depends on (ARM || ARM64) && IOMMU_DMA
  44. help
  45. Enable support for a subset of the ARM long descriptor pagetable
  46. format. This allocator achieves fast performance by
  47. pre-allocating and pre-populating page table memory up front.
  48. only supports a 32 bit virtual address space.
  49. This implementation is mainly optimized for use cases where the
  50. buffers are small (<= 64K) since it only supports 4K page sizes.
  51. config IOMMU_IO_PGTABLE_FAST_SELFTEST
  52. bool "Fast IO pgtable selftests"
  53. depends on IOMMU_IO_PGTABLE_FAST
  54. help
  55. Enable self-tests for "fast" page table allocator.
  56. This performs a series of page-table consistency checks
  57. during boot.
  58. If unsure, say N here.
  59. config IOMMU_IO_PGTABLE_FAST_PROVE_TLB
  60. bool "Prove correctness of TLB maintenance in the Fast DMA mapper"
  61. depends on IOMMU_IO_PGTABLE_FAST
  62. help
  63. Enables some debug features that help prove correctness of TLB
  64. maintenance routines in the Fast DMA mapper. This option will
  65. slow things down considerably, so should only be used in a debug
  66. configuration. This relies on the ability to set bits in an
  67. invalid page table entry, which is disallowed on some hardware
  68. due to errata. If you're running on such a platform then this
  69. option can only be used with unit tests. It will break real use
  70. cases.
  71. If unsure, say N here.
  72. config IOMMU_IO_PGTABLE_ARMV7S
  73. bool "ARMv7/v8 Short Descriptor Format"
  74. select IOMMU_IO_PGTABLE
  75. depends on ARM || ARM64 || COMPILE_TEST
  76. help
  77. Enable support for the ARM Short-descriptor pagetable format.
  78. This supports 32-bit virtual and physical addresses mapped using
  79. 2-level tables with 4KB pages/1MB sections, and contiguous entries
  80. for 64KB pages/16MB supersections if indicated by the IOMMU driver.
  81. config IOMMU_IO_PGTABLE_ARMV7S_SELFTEST
  82. bool "ARMv7s selftests"
  83. depends on IOMMU_IO_PGTABLE_ARMV7S
  84. help
  85. Enable self-tests for ARMv7s page table allocator. This performs
  86. a series of page-table consistency checks during boot.
  87. If unsure, say N here.
  88. config IOMMU_IO_PGTABLE_DART
  89. bool "Apple DART Formats"
  90. select IOMMU_IO_PGTABLE
  91. depends on ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64)
  92. help
  93. Enable support for the Apple DART pagetable formats. These include
  94. the t8020 and t6000/t8110 DART formats used in Apple M1/M2 family
  95. SoCs.
  96. If unsure, say N here.
  97. endmenu
  98. config IOMMU_DEBUGFS
  99. bool "Export IOMMU internals in DebugFS"
  100. depends on DEBUG_FS
  101. help
  102. Allows exposure of IOMMU device internals. This option enables
  103. the use of debugfs by IOMMU drivers as required. Devices can,
  104. at initialization time, cause the IOMMU code to create a top-level
  105. debug/iommu directory, and then populate a subdirectory with
  106. entries as required.
  107. choice
  108. prompt "IOMMU default domain type"
  109. depends on IOMMU_API
  110. default IOMMU_DEFAULT_DMA_LAZY if X86 || IA64
  111. default IOMMU_DEFAULT_DMA_STRICT
  112. help
  113. Choose the type of IOMMU domain used to manage DMA API usage by
  114. device drivers. The options here typically represent different
  115. levels of tradeoff between robustness/security and performance,
  116. depending on the IOMMU driver. Not all IOMMUs support all options.
  117. This choice can be overridden at boot via the command line, and for
  118. some devices also at runtime via sysfs.
  119. If unsure, keep the default.
  120. config IOMMU_DEFAULT_DMA_STRICT
  121. bool "Translated - Strict"
  122. help
  123. Trusted devices use translation to restrict their access to only
  124. DMA-mapped pages, with strict TLB invalidation on unmap. Equivalent
  125. to passing "iommu.passthrough=0 iommu.strict=1" on the command line.
  126. Untrusted devices always use this mode, with an additional layer of
  127. bounce-buffering such that they cannot gain access to any unrelated
  128. data within a mapped page.
  129. config IOMMU_DEFAULT_DMA_LAZY
  130. bool "Translated - Lazy"
  131. help
  132. Trusted devices use translation to restrict their access to only
  133. DMA-mapped pages, but with "lazy" batched TLB invalidation. This
  134. mode allows higher performance with some IOMMUs due to reduced TLB
  135. flushing, but at the cost of reduced isolation since devices may be
  136. able to access memory for some time after it has been unmapped.
  137. Equivalent to passing "iommu.passthrough=0 iommu.strict=0" on the
  138. command line.
  139. If this mode is not supported by the IOMMU driver, the effective
  140. runtime default will fall back to IOMMU_DEFAULT_DMA_STRICT.
  141. config IOMMU_DEFAULT_PASSTHROUGH
  142. bool "Passthrough"
  143. help
  144. Trusted devices are identity-mapped, giving them unrestricted access
  145. to memory with minimal performance overhead. Equivalent to passing
  146. "iommu.passthrough=1" (historically "iommu=pt") on the command line.
  147. If this mode is not supported by the IOMMU driver, the effective
  148. runtime default will fall back to IOMMU_DEFAULT_DMA_STRICT.
  149. endchoice
  150. config OF_IOMMU
  151. def_bool y
  152. depends on OF && IOMMU_API
  153. # IOMMU-agnostic DMA-mapping layer
  154. config IOMMU_DMA
  155. def_bool ARM64 || IA64 || X86
  156. select DMA_OPS
  157. select IOMMU_API
  158. select IOMMU_IOVA
  159. select IRQ_MSI_IOMMU
  160. select NEED_SG_DMA_LENGTH
  161. # Shared Virtual Addressing
  162. config IOMMU_SVA
  163. bool
  164. select IOASID
  165. config FSL_PAMU
  166. bool "Freescale IOMMU support"
  167. depends on PCI
  168. depends on PHYS_64BIT
  169. depends on PPC_E500MC || (COMPILE_TEST && PPC)
  170. select IOMMU_API
  171. select GENERIC_ALLOCATOR
  172. help
  173. Freescale PAMU support. PAMU is the IOMMU present on Freescale QorIQ platforms.
  174. PAMU can authorize memory access, remap the memory address, and remap I/O
  175. transaction types.
  176. # MSM IOMMU support
  177. config MSM_IOMMU
  178. bool "MSM IOMMU Support"
  179. depends on ARM
  180. depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST
  181. select IOMMU_API
  182. select IOMMU_IO_PGTABLE_ARMV7S
  183. help
  184. Support for the IOMMUs found on certain Qualcomm SOCs.
  185. These IOMMUs allow virtualization of the address space used by most
  186. cores within the multimedia subsystem.
  187. If unsure, say N here.
  188. source "drivers/iommu/amd/Kconfig"
  189. source "drivers/iommu/intel/Kconfig"
  190. config IRQ_REMAP
  191. bool "Support for Interrupt Remapping"
  192. depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI
  193. select DMAR_TABLE
  194. help
  195. Supports Interrupt remapping for IO-APIC and MSI devices.
  196. To use x2apic mode in the CPU's which support x2APIC enhancements or
  197. to support platforms with CPU's having > 8 bit APIC ID, say Y.
  198. # OMAP IOMMU support
  199. config OMAP_IOMMU
  200. bool "OMAP IOMMU Support"
  201. depends on ARCH_OMAP2PLUS || COMPILE_TEST
  202. select IOMMU_API
  203. help
  204. The OMAP3 media platform drivers depend on iommu support,
  205. if you need them say Y here.
  206. config OMAP_IOMMU_DEBUG
  207. bool "Export OMAP IOMMU internals in DebugFS"
  208. depends on OMAP_IOMMU && DEBUG_FS
  209. help
  210. Select this to see extensive information about
  211. the internal state of OMAP IOMMU in debugfs.
  212. Say N unless you know you need this.
  213. config ROCKCHIP_IOMMU
  214. bool "Rockchip IOMMU Support"
  215. depends on ARCH_ROCKCHIP || COMPILE_TEST
  216. select IOMMU_API
  217. select ARM_DMA_USE_IOMMU
  218. help
  219. Support for IOMMUs found on Rockchip rk32xx SOCs.
  220. These IOMMUs allow virtualization of the address space used by most
  221. cores within the multimedia subsystem.
  222. Say Y here if you are using a Rockchip SoC that includes an IOMMU
  223. device.
  224. config SUN50I_IOMMU
  225. bool "Allwinner H6 IOMMU Support"
  226. depends on HAS_DMA
  227. depends on ARCH_SUNXI || COMPILE_TEST
  228. select ARM_DMA_USE_IOMMU
  229. select IOMMU_API
  230. help
  231. Support for the IOMMU introduced in the Allwinner H6 SoCs.
  232. config TEGRA_IOMMU_GART
  233. bool "Tegra GART IOMMU Support"
  234. depends on ARCH_TEGRA_2x_SOC
  235. depends on TEGRA_MC
  236. select IOMMU_API
  237. help
  238. Enables support for remapping discontiguous physical memory
  239. shared with the operating system into contiguous I/O virtual
  240. space through the GART (Graphics Address Relocation Table)
  241. hardware included on Tegra SoCs.
  242. config TEGRA_IOMMU_SMMU
  243. bool "NVIDIA Tegra SMMU Support"
  244. depends on ARCH_TEGRA
  245. depends on TEGRA_AHB
  246. depends on TEGRA_MC
  247. select IOMMU_API
  248. help
  249. This driver supports the IOMMU hardware (SMMU) found on NVIDIA Tegra
  250. SoCs (Tegra30 up to Tegra210).
  251. config EXYNOS_IOMMU
  252. bool "Exynos IOMMU Support"
  253. depends on ARCH_EXYNOS || COMPILE_TEST
  254. depends on !CPU_BIG_ENDIAN # revisit driver if we can enable big-endian ptes
  255. select IOMMU_API
  256. select ARM_DMA_USE_IOMMU
  257. help
  258. Support for the IOMMU (System MMU) of Samsung Exynos application
  259. processor family. This enables H/W multimedia accelerators to see
  260. non-linear physical memory chunks as linear memory in their
  261. address space.
  262. If unsure, say N here.
  263. config EXYNOS_IOMMU_DEBUG
  264. bool "Debugging log for Exynos IOMMU"
  265. depends on EXYNOS_IOMMU
  266. help
  267. Select this to see the detailed log message that shows what
  268. happens in the IOMMU driver.
  269. Say N unless you need kernel log message for IOMMU debugging.
  270. config IPMMU_VMSA
  271. bool "Renesas VMSA-compatible IPMMU"
  272. depends on ARCH_RENESAS || (COMPILE_TEST && !GENERIC_ATOMIC64)
  273. select IOMMU_API
  274. select IOMMU_IO_PGTABLE_LPAE
  275. select ARM_DMA_USE_IOMMU
  276. help
  277. Support for the Renesas VMSA-compatible IPMMU found in the R-Mobile
  278. APE6, R-Car Gen{2,3} and RZ/G{1,2} SoCs.
  279. If unsure, say N.
  280. config SPAPR_TCE_IOMMU
  281. bool "sPAPR TCE IOMMU Support"
  282. depends on PPC_POWERNV || PPC_PSERIES
  283. select IOMMU_API
  284. help
  285. Enables bits of IOMMU API required by VFIO. The iommu_ops
  286. is not implemented as it is not necessary for VFIO.
  287. config QTI_IOMMU_SUPPORT
  288. tristate "Support for QTI iommu drivers"
  289. help
  290. The QTI GPU device may switch between multiple iommu domains,
  291. depending on usecase. This introduces a need to track all such
  292. domains in a non-driver specific manner.
  293. If in doubt say N.
  294. config APPLE_DART
  295. tristate "Apple DART IOMMU Support"
  296. depends on ARCH_APPLE || (COMPILE_TEST && !GENERIC_ATOMIC64)
  297. select IOMMU_API
  298. select IOMMU_IO_PGTABLE_DART
  299. default ARCH_APPLE
  300. help
  301. Support for Apple DART (Device Address Resolution Table) IOMMUs
  302. found in Apple ARM SoCs like the M1.
  303. This IOMMU is required for most peripherals using DMA to access
  304. the main memory.
  305. Say Y here if you are using an Apple SoC.
  306. # ARM IOMMU support
  307. config ARM_SMMU
  308. tristate "ARM Ltd. System MMU (SMMU) Support"
  309. depends on ARM64 || ARM || (COMPILE_TEST && !GENERIC_ATOMIC64)
  310. select IOMMU_API
  311. select IOMMU_IO_PGTABLE_LPAE
  312. select ARM_DMA_USE_IOMMU if ARM
  313. help
  314. Support for implementations of the ARM System MMU architecture
  315. versions 1 and 2.
  316. Say Y here if your SoC includes an IOMMU device implementing
  317. the ARM SMMU architecture.
  318. config ARM_SMMU_CONTEXT_FAULT_RETRY
  319. bool "Context fault retry sequence"
  320. depends on ARM_SMMU && ARCH_WAIPIO
  321. help
  322. In some cases, issuing a tlb invalidate operation after a
  323. context fault may cause a subsequent retry of the failing
  324. address to succeed. Only applies to clients which have
  325. stall-on-fault enabled, like display.
  326. config ARM_SMMU_LEGACY_DT_BINDINGS
  327. bool "Support the legacy \"mmu-masters\" devicetree bindings"
  328. depends on ARM_SMMU=y && OF
  329. help
  330. Support for the badly designed and deprecated "mmu-masters"
  331. devicetree bindings. This allows some DMA masters to attach
  332. to the SMMU but does not provide any support via the DMA API.
  333. If you're lucky, you might be able to get VFIO up and running.
  334. If you say Y here then you'll make me very sad. Instead, say N
  335. and move your firmware to the utopian future that was 2016.
  336. config ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT
  337. bool "Default to disabling bypass on ARM SMMU v1 and v2"
  338. depends on ARM_SMMU
  339. default y
  340. help
  341. Say Y here to (by default) disable bypass streams such that
  342. incoming transactions from devices that are not attached to
  343. an iommu domain will report an abort back to the device and
  344. will not be allowed to pass through the SMMU.
  345. Any old kernels that existed before this KConfig was
  346. introduced would default to _allowing_ bypass (AKA the
  347. equivalent of NO for this config). However the default for
  348. this option is YES because the old behavior is insecure.
  349. There are few reasons to allow unmatched stream bypass, and
  350. even fewer good ones. If saying YES here breaks your board
  351. you should work on fixing your board. This KConfig option
  352. is expected to be removed in the future and we'll simply
  353. hardcode the bypass disable in the code.
  354. NOTE: the kernel command line parameter
  355. 'arm-smmu.disable_bypass' will continue to override this
  356. config.
  357. config ARM_SMMU_SELFTEST
  358. bool "ARM SMMU self test support"
  359. depends on ARM_SMMU
  360. help
  361. Enables self tests for arm smmu. Tests basic hardware
  362. configurations like interrupts. Note that enabling this
  363. option can marginally increase the boot time.
  364. If unsure, say N here.
  365. config ARM_SMMU_QCOM
  366. def_tristate y
  367. depends on ARM_SMMU && ARCH_QCOM
  368. select QCOM_SCM
  369. help
  370. When running on a Qualcomm platform that has the custom variant
  371. of the ARM SMMU, this needs to be built into the SMMU driver.
  372. config ARM_SMMU_QCOM_DEBUG
  373. bool "ARM SMMU QCOM implementation defined debug support"
  374. depends on ARM_SMMU_QCOM
  375. help
  376. Support for implementation specific debug features in ARM SMMU
  377. hardware found in QTI platforms.
  378. Say Y here to enable debug for issues such as TLB sync timeouts
  379. which requires implementation defined register dumps.
  380. config ARM_SMMU_TESTBUS
  381. bool "Enable ARM SMMU testbus feature "
  382. depends on ARM_SMMU
  383. help
  384. Enable testbus feature to help in capturing TCU/TBU state and
  385. help debug TLB Sync timeout failure.Enables option for testbus
  386. debugfs to select and read testbus output.
  387. Note to use this only on debug builds.
  388. If unsure, say N here.
  389. config ARM_SMMU_TESTBUS_DEBUGFS
  390. bool "Expose testbus control debugfs nodes"
  391. depends on ARM_SMMU && IOMMU_DEBUGFS && ARM_SMMU_TESTBUS
  392. help
  393. Support for exposing debugfs nodes to set testbus select values
  394. for selecting a testbus to inspect for a particular TCU/TBU
  395. on an SMMU. This also exposes debugfs nodes to read testbus output
  396. after the output has been selected.
  397. config ARM_SMMU_CAPTUREBUS_DEBUGFS
  398. bool "Expose capturebus control debugfs nodes"
  399. depends on ARM_SMMU && QCOM_IOMMU_DEBUG
  400. help
  401. Support for exposing debugfs nodes to configure capturebus for each
  402. tbu of an SMMU. This also exposes debugfs nodes to get the snapshot
  403. of capturebus.
  404. If unsure, say N here.
  405. config ARM_SMMU_V3
  406. tristate "ARM Ltd. System MMU Version 3 (SMMUv3) Support"
  407. depends on ARM64
  408. select IOMMU_API
  409. select IOMMU_IO_PGTABLE_LPAE
  410. select GENERIC_MSI_IRQ_DOMAIN
  411. help
  412. Support for implementations of the ARM System MMU architecture
  413. version 3 providing translation support to a PCIe root complex.
  414. Say Y here if your system includes an IOMMU device implementing
  415. the ARM SMMUv3 architecture.
  416. config ARM_PARAVIRT_SMMU_V3
  417. tristate "Paravirtualized ARM SMMU V3 driver support"
  418. depends on ARM64
  419. depends on QCOM_SCM
  420. select IOMMU_API
  421. select IOMMU_IO_PGTABLE_LPAE
  422. select GENERIC_MSI_IRQ_DOMAIN
  423. help
  424. Support for a paravirtualized implementation of ARM SMMU V3
  425. architecture.
  426. Say Y here if your system has the corresponding backend
  427. SMMU-v3 support available which runs at a higher exception
  428. level.
  429. config ARM_SMMU_V3_SVA
  430. bool "Shared Virtual Addressing support for the ARM SMMUv3"
  431. depends on ARM_SMMU_V3
  432. select IOMMU_SVA
  433. select MMU_NOTIFIER
  434. help
  435. Support for sharing process address spaces with devices using the
  436. SMMUv3.
  437. Say Y here if your system supports SVA extensions such as PCIe PASID
  438. and PRI.
  439. config IOMMU_TLBSYNC_DEBUG
  440. bool "TLB sync timeout debug"
  441. depends on ARM_SMMU
  442. help
  443. Collects the SMMU system state information after the
  444. first TLB sync timeout failure by calling BUG() from
  445. a workqueue thread. Note to use this only on debug
  446. builds.
  447. config ARM_SMMU_TESTBUS_DUMP
  448. bool "ARM SMMU testbus dump"
  449. depends on ARM_SMMU && ARM_SMMU_TESTBUS
  450. help
  451. Enables testbus dump collection on arm smmu right after TLB
  452. sync timeout failure.
  453. Note to use this only on debug builds.
  454. If unsure, say N here.
  455. config ARM_SMMU_TESTBUS_DUMP_GEN3AUTO
  456. bool "ARM SMMU testbus dump for gen3auto"
  457. depends on ARM_SMMU && ARM_SMMU_TESTBUS && ARM_SMMU_TESTBUS_DUMP
  458. help
  459. Enables testbus dump collection on arm smmu right after TLB
  460. sync timeout failure on gen3auto.
  461. Note to use this only on debug builds.
  462. If unsure, say N here.
  463. config QCOM_LAZY_MAPPING
  464. tristate "Reference counted iommu-mapping support"
  465. depends on QCOM_DMABUF_HEAPS
  466. depends on IOMMU_API
  467. help
  468. DMA-BUFs may be shared between several software clients.
  469. Reference counting the mapping may simplify coordination between
  470. these clients, and decrease latency by preventing multiple
  471. map/unmaps of the same region.
  472. If unsure, say N here.
  473. config S390_IOMMU
  474. def_bool y if S390 && PCI
  475. depends on S390 && PCI
  476. select IOMMU_API
  477. help
  478. Support for the IOMMU API for s390 PCI devices.
  479. config S390_CCW_IOMMU
  480. bool "S390 CCW IOMMU Support"
  481. depends on S390 && CCW || COMPILE_TEST
  482. select IOMMU_API
  483. help
  484. Enables bits of IOMMU API required by VFIO. The iommu_ops
  485. is not implemented as it is not necessary for VFIO.
  486. config S390_AP_IOMMU
  487. bool "S390 AP IOMMU Support"
  488. depends on S390 && ZCRYPT || COMPILE_TEST
  489. select IOMMU_API
  490. help
  491. Enables bits of IOMMU API required by VFIO. The iommu_ops
  492. is not implemented as it is not necessary for VFIO.
  493. config MTK_IOMMU
  494. tristate "MediaTek IOMMU Support"
  495. depends on ARCH_MEDIATEK || COMPILE_TEST
  496. select ARM_DMA_USE_IOMMU
  497. select IOMMU_API
  498. select IOMMU_IO_PGTABLE_ARMV7S
  499. select MEMORY
  500. select MTK_SMI
  501. help
  502. Support for the M4U on certain Mediatek SOCs. M4U is MultiMedia
  503. Memory Management Unit. This option enables remapping of DMA memory
  504. accesses for the multimedia subsystem.
  505. If unsure, say N here.
  506. config MTK_IOMMU_V1
  507. tristate "MediaTek IOMMU Version 1 (M4U gen1) Support"
  508. depends on ARM
  509. depends on ARCH_MEDIATEK || COMPILE_TEST
  510. select ARM_DMA_USE_IOMMU
  511. select IOMMU_API
  512. select MEMORY
  513. select MTK_SMI
  514. help
  515. Support for the M4U on certain Mediatek SoCs. M4U generation 1 HW is
  516. Multimedia Memory Managememt Unit. This option enables remapping of
  517. DMA memory accesses for the multimedia subsystem.
  518. if unsure, say N here.
  519. config QCOM_IOMMU
  520. # Note: iommu drivers cannot (yet?) be built as modules
  521. bool "Qualcomm IOMMU Support"
  522. depends on ARCH_QCOM || (COMPILE_TEST && !GENERIC_ATOMIC64)
  523. select QCOM_SCM
  524. select IOMMU_API
  525. select IOMMU_IO_PGTABLE_LPAE
  526. select ARM_DMA_USE_IOMMU
  527. help
  528. Support for IOMMU on certain Qualcomm SoCs.
  529. config HYPERV_IOMMU
  530. bool "Hyper-V x2APIC IRQ Handling"
  531. depends on HYPERV && X86
  532. select IOMMU_API
  533. default HYPERV
  534. help
  535. Stub IOMMU driver to handle IRQs as to allow Hyper-V Linux
  536. guests to run with x2APIC mode enabled.
  537. config VIRTIO_IOMMU
  538. tristate "Virtio IOMMU driver"
  539. depends on VIRTIO
  540. depends on (ARM64 || X86)
  541. select IOMMU_API
  542. select INTERVAL_TREE
  543. select ACPI_VIOT if ACPI
  544. help
  545. Para-virtualised IOMMU driver with virtio.
  546. Say Y here if you intend to run this kernel as a guest.
  547. config QCOM_IOMMU_UTIL
  548. tristate "Support for qcom additions to the iommu framework"
  549. help
  550. QCOM iommu drivers support a general set of functionality in
  551. addition to the functions provided by the iommu framework.
  552. This includes devicetree properties for configuring iommu
  553. groups and iova ranges.
  554. Say N here if unsure.
  555. config SPRD_IOMMU
  556. tristate "Unisoc IOMMU Support"
  557. depends on ARCH_SPRD || COMPILE_TEST
  558. select IOMMU_API
  559. help
  560. Support for IOMMU on Unisoc's SoCs, this IOMMU can be used by
  561. Unisoc's multimedia devices, such as display, Image codec(jpeg)
  562. and a few signal processors, including VSP(video), GSP(graphic),
  563. ISP(image), and CPP(camera pixel processor), etc.
  564. Say Y here if you want to use the multimedia devices listed above.
  565. config QCOM_IOMMU_DEBUG
  566. tristate "IOMMU debugging and testing"
  567. depends on QCOM_IOMMU_UTIL
  568. depends on DEBUG_FS
  569. help
  570. This option is used to enable profiling and debugging in
  571. the IOMMU framework code. IOMMU profiling and debugging
  572. can be done through the debugfs nodes which this option
  573. makes available.
  574. endif # IOMMU_SUPPORT