1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 2bd3c2e66SSakari Ailus# The IOVA library may also be used by non-IOMMU_API users 3bd3c2e66SSakari Ailusconfig IOMMU_IOVA 4bd3c2e66SSakari Ailus tristate 5bd3c2e66SSakari Ailus 6ab493a0fSOhad Ben-Cohen# IOMMU_API always gets selected by whoever wants it. 7ab493a0fSOhad Ben-Cohenconfig IOMMU_API 8ab493a0fSOhad Ben-Cohen bool 9b10f127eSOhad Ben-Cohen 1068255b62SJoerg Roedelmenuconfig IOMMU_SUPPORT 1168255b62SJoerg Roedel bool "IOMMU Hardware Support" 12e5144c93SArnd Bergmann depends on MMU 1368255b62SJoerg Roedel default y 14a7f7f624SMasahiro Yamada help 1568255b62SJoerg Roedel Say Y here if you want to compile device drivers for IO Memory 1668255b62SJoerg Roedel Management Units into the kernel. These devices usually allow to 1768255b62SJoerg Roedel remap DMA requests and/or remap interrupts from other devices on the 1868255b62SJoerg Roedel system. 1968255b62SJoerg Roedel 2068255b62SJoerg Roedelif IOMMU_SUPPORT 2168255b62SJoerg Roedel 22fdb1d7beSWill Deaconmenu "Generic IOMMU Pagetable Support" 23fdb1d7beSWill Deacon 24fdb1d7beSWill Deacon# Selected by the actual pagetable implementations 25fdb1d7beSWill Deaconconfig IOMMU_IO_PGTABLE 26fdb1d7beSWill Deacon bool 27fdb1d7beSWill Deacon 28e1d3c0fdSWill Deaconconfig IOMMU_IO_PGTABLE_LPAE 29e1d3c0fdSWill Deacon bool "ARMv7/v8 Long Descriptor Format" 30e1d3c0fdSWill Deacon select IOMMU_IO_PGTABLE 31d286a58bSRobin Murphy depends on ARM || ARM64 || COMPILE_TEST 321b0b5f50SGeert Uytterhoeven depends on !GENERIC_ATOMIC64 # for cmpxchg64() 33e1d3c0fdSWill Deacon help 34e1d3c0fdSWill Deacon Enable support for the ARM long descriptor pagetable format. 35e1d3c0fdSWill Deacon This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page 36e1d3c0fdSWill Deacon sizes at both stage-1 and stage-2, as well as address spaces 37e1d3c0fdSWill Deacon up to 48-bits in size. 38e1d3c0fdSWill Deacon 39fe4b991dSWill Deaconconfig IOMMU_IO_PGTABLE_LPAE_SELFTEST 40fe4b991dSWill Deacon bool "LPAE selftests" 41fe4b991dSWill Deacon depends on IOMMU_IO_PGTABLE_LPAE 42fe4b991dSWill Deacon help 43fe4b991dSWill Deacon Enable self-tests for LPAE page table allocator. This performs 44fe4b991dSWill Deacon a series of page-table consistency checks during boot. 45fe4b991dSWill Deacon 46fe4b991dSWill Deacon If unsure, say N here. 47fe4b991dSWill Deacon 48e5fc9753SRobin Murphyconfig IOMMU_IO_PGTABLE_ARMV7S 49e5fc9753SRobin Murphy bool "ARMv7/v8 Short Descriptor Format" 50e5fc9753SRobin Murphy select IOMMU_IO_PGTABLE 5148e6f765SGeert Uytterhoeven depends on ARM || ARM64 || COMPILE_TEST 52e5fc9753SRobin Murphy help 53e5fc9753SRobin Murphy Enable support for the ARM Short-descriptor pagetable format. 54e5fc9753SRobin Murphy This supports 32-bit virtual and physical addresses mapped using 55e5fc9753SRobin Murphy 2-level tables with 4KB pages/1MB sections, and contiguous entries 56e5fc9753SRobin Murphy for 64KB pages/16MB supersections if indicated by the IOMMU driver. 57e5fc9753SRobin Murphy 58e5fc9753SRobin Murphyconfig IOMMU_IO_PGTABLE_ARMV7S_SELFTEST 59e5fc9753SRobin Murphy bool "ARMv7s selftests" 60e5fc9753SRobin Murphy depends on IOMMU_IO_PGTABLE_ARMV7S 61e5fc9753SRobin Murphy help 62e5fc9753SRobin Murphy Enable self-tests for ARMv7s page table allocator. This performs 63e5fc9753SRobin Murphy a series of page-table consistency checks during boot. 64e5fc9753SRobin Murphy 65e5fc9753SRobin Murphy If unsure, say N here. 66e5fc9753SRobin Murphy 67745ef109SJanne Grunauconfig IOMMU_IO_PGTABLE_DART 68745ef109SJanne Grunau bool "Apple DART Formats" 69745ef109SJanne Grunau select IOMMU_IO_PGTABLE 70d286a58bSRobin Murphy depends on ARM64 || COMPILE_TEST 711b0b5f50SGeert Uytterhoeven depends on !GENERIC_ATOMIC64 # for cmpxchg64() 72745ef109SJanne Grunau help 73745ef109SJanne Grunau Enable support for the Apple DART pagetable formats. These include 74745ef109SJanne Grunau the t8020 and t6000/t8110 DART formats used in Apple M1/M2 family 75745ef109SJanne Grunau SoCs. 76745ef109SJanne Grunau 77745ef109SJanne Grunau If unsure, say N here. 78745ef109SJanne Grunau 79fdb1d7beSWill Deaconendmenu 80fdb1d7beSWill Deacon 81bad614b2SGary R Hookconfig IOMMU_DEBUGFS 82bad614b2SGary R Hook bool "Export IOMMU internals in DebugFS" 83bad614b2SGary R Hook depends on DEBUG_FS 84bad614b2SGary R Hook help 85bad614b2SGary R Hook Allows exposure of IOMMU device internals. This option enables 86bad614b2SGary R Hook the use of debugfs by IOMMU drivers as required. Devices can, 87bad614b2SGary R Hook at initialization time, cause the IOMMU code to create a top-level 88bad614b2SGary R Hook debug/iommu directory, and then populate a subdirectory with 89bad614b2SGary R Hook entries as required. 90bad614b2SGary R Hook 91712d8f20SZhen Leichoice 92e96763ecSRobin Murphy prompt "IOMMU default domain type" 9358d11317SOlof Johansson depends on IOMMU_API 948cc63319SRobin Murphy default IOMMU_DEFAULT_DMA_LAZY if X86 || IA64 95e96763ecSRobin Murphy default IOMMU_DEFAULT_DMA_STRICT 9658d11317SOlof Johansson help 97e96763ecSRobin Murphy Choose the type of IOMMU domain used to manage DMA API usage by 98e96763ecSRobin Murphy device drivers. The options here typically represent different 99e96763ecSRobin Murphy levels of tradeoff between robustness/security and performance, 100e96763ecSRobin Murphy depending on the IOMMU driver. Not all IOMMUs support all options. 101e96763ecSRobin Murphy This choice can be overridden at boot via the command line, and for 102e96763ecSRobin Murphy some devices also at runtime via sysfs. 10358d11317SOlof Johansson 104712d8f20SZhen Lei If unsure, keep the default. 105712d8f20SZhen Lei 106e96763ecSRobin Murphyconfig IOMMU_DEFAULT_DMA_STRICT 107e96763ecSRobin Murphy bool "Translated - Strict" 108712d8f20SZhen Lei help 109e96763ecSRobin Murphy Trusted devices use translation to restrict their access to only 110e96763ecSRobin Murphy DMA-mapped pages, with strict TLB invalidation on unmap. Equivalent 111e96763ecSRobin Murphy to passing "iommu.passthrough=0 iommu.strict=1" on the command line. 112712d8f20SZhen Lei 113e96763ecSRobin Murphy Untrusted devices always use this mode, with an additional layer of 114e96763ecSRobin Murphy bounce-buffering such that they cannot gain access to any unrelated 115e96763ecSRobin Murphy data within a mapped page. 116e96763ecSRobin Murphy 117e96763ecSRobin Murphyconfig IOMMU_DEFAULT_DMA_LAZY 118e96763ecSRobin Murphy bool "Translated - Lazy" 119712d8f20SZhen Lei help 120e96763ecSRobin Murphy Trusted devices use translation to restrict their access to only 121e96763ecSRobin Murphy DMA-mapped pages, but with "lazy" batched TLB invalidation. This 122e96763ecSRobin Murphy mode allows higher performance with some IOMMUs due to reduced TLB 123e96763ecSRobin Murphy flushing, but at the cost of reduced isolation since devices may be 124e96763ecSRobin Murphy able to access memory for some time after it has been unmapped. 125e96763ecSRobin Murphy Equivalent to passing "iommu.passthrough=0 iommu.strict=0" on the 126e96763ecSRobin Murphy command line. 127712d8f20SZhen Lei 128e96763ecSRobin Murphy If this mode is not supported by the IOMMU driver, the effective 129e96763ecSRobin Murphy runtime default will fall back to IOMMU_DEFAULT_DMA_STRICT. 130e96763ecSRobin Murphy 131e96763ecSRobin Murphyconfig IOMMU_DEFAULT_PASSTHROUGH 132e96763ecSRobin Murphy bool "Passthrough" 133e96763ecSRobin Murphy help 134e96763ecSRobin Murphy Trusted devices are identity-mapped, giving them unrestricted access 135e96763ecSRobin Murphy to memory with minimal performance overhead. Equivalent to passing 136e96763ecSRobin Murphy "iommu.passthrough=1" (historically "iommu=pt") on the command line. 137e96763ecSRobin Murphy 138e96763ecSRobin Murphy If this mode is not supported by the IOMMU driver, the effective 139e96763ecSRobin Murphy runtime default will fall back to IOMMU_DEFAULT_DMA_STRICT. 140712d8f20SZhen Lei 141712d8f20SZhen Leiendchoice 14258d11317SOlof Johansson 1434e0ee78fSHiroshi Doyuconfig OF_IOMMU 1444e0ee78fSHiroshi Doyu def_bool y 1457eba1d51SWill Deacon depends on OF && IOMMU_API 1464e0ee78fSHiroshi Doyu 1470db2e5d1SRobin Murphy# IOMMU-agnostic DMA-mapping layer 1480db2e5d1SRobin Murphyconfig IOMMU_DMA 149de9f8a91SRobin Murphy def_bool ARM64 || IA64 || X86 1502f9237d4SChristoph Hellwig select DMA_OPS 1510db2e5d1SRobin Murphy select IOMMU_API 1520db2e5d1SRobin Murphy select IOMMU_IOVA 153ece6e6f0SJulien Grall select IRQ_MSI_IOMMU 15459a68eb8SRobin Murphy select NEED_SG_DMA_LENGTH 155861370f4SCatalin Marinas select NEED_SG_DMA_FLAGS if SWIOTLB 1560db2e5d1SRobin Murphy 1577ba56472SFenghua Yu# Shared Virtual Addressing 1587ba56472SFenghua Yuconfig IOMMU_SVA 159cfc78dfdSJean-Philippe Brucker bool 160cfc78dfdSJean-Philippe Brucker 161695093e3SVarun Sethiconfig FSL_PAMU 162695093e3SVarun Sethi bool "Freescale IOMMU support" 163a4d98fb3SJoerg Roedel depends on PCI 164af29d9faSJoerg Roedel depends on PHYS_64BIT 165a0d284d2SAndy Fleming depends on PPC_E500MC || (COMPILE_TEST && PPC) 166695093e3SVarun Sethi select IOMMU_API 167695093e3SVarun Sethi select GENERIC_ALLOCATOR 168695093e3SVarun Sethi help 169695093e3SVarun Sethi Freescale PAMU support. PAMU is the IOMMU present on Freescale QorIQ platforms. 170695093e3SVarun Sethi PAMU can authorize memory access, remap the memory address, and remap I/O 171695093e3SVarun Sethi transaction types. 172695093e3SVarun Sethi 173b10f127eSOhad Ben-Cohen# MSM IOMMU support 174b10f127eSOhad Ben-Cohenconfig MSM_IOMMU 175b10f127eSOhad Ben-Cohen bool "MSM IOMMU Support" 176477ab7a1SJoerg Roedel depends on ARM 177477ab7a1SJoerg Roedel depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST 178b10f127eSOhad Ben-Cohen select IOMMU_API 179c9220fbdSSricharan R select IOMMU_IO_PGTABLE_ARMV7S 180b10f127eSOhad Ben-Cohen help 181b10f127eSOhad Ben-Cohen Support for the IOMMUs found on certain Qualcomm SOCs. 182b10f127eSOhad Ben-Cohen These IOMMUs allow virtualization of the address space used by most 183b10f127eSOhad Ben-Cohen cores within the multimedia subsystem. 184b10f127eSOhad Ben-Cohen 185b10f127eSOhad Ben-Cohen If unsure, say N here. 186b10f127eSOhad Ben-Cohen 187cbe94c6eSJerry Snitselaarsource "drivers/iommu/amd/Kconfig" 188ab65ba57SJerry Snitselaarsource "drivers/iommu/intel/Kconfig" 1892ff4bed7SJason Gunthorpesource "drivers/iommu/iommufd/Kconfig" 19004618252SLu Baolu 191d3f13810SSuresh Siddhaconfig IRQ_REMAP 192a446e219SKees Cook bool "Support for Interrupt Remapping" 193a446e219SKees Cook depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI 194*582a7ebaSBert Karwatzki select DMAR_TABLE if INTEL_IOMMU 195a7f7f624SMasahiro Yamada help 196166e9278SOhad Ben-Cohen Supports Interrupt remapping for IO-APIC and MSI devices. 197166e9278SOhad Ben-Cohen To use x2apic mode in the CPU's which support x2APIC enhancements or 198166e9278SOhad Ben-Cohen to support platforms with CPU's having > 8 bit APIC ID, say Y. 19968255b62SJoerg Roedel 200fcf3a6efSOhad Ben-Cohen# OMAP IOMMU support 201fcf3a6efSOhad Ben-Cohenconfig OMAP_IOMMU 202fcf3a6efSOhad Ben-Cohen bool "OMAP IOMMU Support" 203477ab7a1SJoerg Roedel depends on ARCH_OMAP2PLUS || COMPILE_TEST 204fcf3a6efSOhad Ben-Cohen select IOMMU_API 205a7f7f624SMasahiro Yamada help 20606b718c0SGerd Hoffmann The OMAP3 media platform drivers depend on iommu support, 20706b718c0SGerd Hoffmann if you need them say Y here. 208fcf3a6efSOhad Ben-Cohen 209fcf3a6efSOhad Ben-Cohenconfig OMAP_IOMMU_DEBUG 21061c75352SSuman Anna bool "Export OMAP IOMMU internals in DebugFS" 211baaa7b5dSLaurent Pinchart depends on OMAP_IOMMU && DEBUG_FS 212a7f7f624SMasahiro Yamada help 213fcf3a6efSOhad Ben-Cohen Select this to see extensive information about 214baaa7b5dSLaurent Pinchart the internal state of OMAP IOMMU in debugfs. 215fcf3a6efSOhad Ben-Cohen 216fcf3a6efSOhad Ben-Cohen Say N unless you know you need this. 217fcf3a6efSOhad Ben-Cohen 218c68a2921SDaniel Kurtzconfig ROCKCHIP_IOMMU 219c68a2921SDaniel Kurtz bool "Rockchip IOMMU Support" 22011175886SJoerg Roedel depends on ARCH_ROCKCHIP || COMPILE_TEST 221c68a2921SDaniel Kurtz select IOMMU_API 222c68a2921SDaniel Kurtz select ARM_DMA_USE_IOMMU 223c68a2921SDaniel Kurtz help 224c68a2921SDaniel Kurtz Support for IOMMUs found on Rockchip rk32xx SOCs. 225c68a2921SDaniel Kurtz These IOMMUs allow virtualization of the address space used by most 226c68a2921SDaniel Kurtz cores within the multimedia subsystem. 227c68a2921SDaniel Kurtz Say Y here if you are using a Rockchip SoC that includes an IOMMU 228c68a2921SDaniel Kurtz device. 229c68a2921SDaniel Kurtz 2304100b8c2SMaxime Ripardconfig SUN50I_IOMMU 2314100b8c2SMaxime Ripard bool "Allwinner H6 IOMMU Support" 232c7451e49SGeert Uytterhoeven depends on HAS_DMA 2334100b8c2SMaxime Ripard depends on ARCH_SUNXI || COMPILE_TEST 2344100b8c2SMaxime Ripard select ARM_DMA_USE_IOMMU 2354100b8c2SMaxime Ripard select IOMMU_API 2364100b8c2SMaxime Ripard help 2374100b8c2SMaxime Ripard Support for the IOMMU introduced in the Allwinner H6 SoCs. 2384100b8c2SMaxime Ripard 239d53e54b4SHiroshi DOYUconfig TEGRA_IOMMU_GART 240d53e54b4SHiroshi DOYU bool "Tegra GART IOMMU Support" 241d53e54b4SHiroshi DOYU depends on ARCH_TEGRA_2x_SOC 242ce2785a7SDmitry Osipenko depends on TEGRA_MC 243d53e54b4SHiroshi DOYU select IOMMU_API 244d53e54b4SHiroshi DOYU help 245d53e54b4SHiroshi DOYU Enables support for remapping discontiguous physical memory 246d53e54b4SHiroshi DOYU shared with the operating system into contiguous I/O virtual 247d53e54b4SHiroshi DOYU space through the GART (Graphics Address Relocation Table) 248d53e54b4SHiroshi DOYU hardware included on Tegra SoCs. 249d53e54b4SHiroshi DOYU 2507a31f6f4SHiroshi DOYUconfig TEGRA_IOMMU_SMMU 25189184651SThierry Reding bool "NVIDIA Tegra SMMU Support" 25289184651SThierry Reding depends on ARCH_TEGRA 25389184651SThierry Reding depends on TEGRA_AHB 25489184651SThierry Reding depends on TEGRA_MC 2557a31f6f4SHiroshi DOYU select IOMMU_API 2567a31f6f4SHiroshi DOYU help 25789184651SThierry Reding This driver supports the IOMMU hardware (SMMU) found on NVIDIA Tegra 258588c43a7SThierry Reding SoCs (Tegra30 up to Tegra210). 2597a31f6f4SHiroshi DOYU 2602a96536eSKyongHo Choconfig EXYNOS_IOMMU 2612a96536eSKyongHo Cho bool "Exynos IOMMU Support" 262b4ceb4a5SRobin Murphy depends on ARCH_EXYNOS || COMPILE_TEST 263db3a7fd7SArnd Bergmann depends on !CPU_BIG_ENDIAN # revisit driver if we can enable big-endian ptes 2642a96536eSKyongHo Cho select IOMMU_API 2654802c1d0STushar Behera select ARM_DMA_USE_IOMMU 2662a96536eSKyongHo Cho help 2672a96536eSKyongHo Cho Support for the IOMMU (System MMU) of Samsung Exynos application 2685455d700SSachin Kamat processor family. This enables H/W multimedia accelerators to see 2695455d700SSachin Kamat non-linear physical memory chunks as linear memory in their 2705455d700SSachin Kamat address space. 2712a96536eSKyongHo Cho 2722a96536eSKyongHo Cho If unsure, say N here. 2732a96536eSKyongHo Cho 2742a96536eSKyongHo Choconfig EXYNOS_IOMMU_DEBUG 2752a96536eSKyongHo Cho bool "Debugging log for Exynos IOMMU" 2762a96536eSKyongHo Cho depends on EXYNOS_IOMMU 2772a96536eSKyongHo Cho help 2782a96536eSKyongHo Cho Select this to see the detailed log message that shows what 2795455d700SSachin Kamat happens in the IOMMU driver. 2802a96536eSKyongHo Cho 2815455d700SSachin Kamat Say N unless you need kernel log message for IOMMU debugging. 2822a96536eSKyongHo Cho 283d25a2a16SLaurent Pinchartconfig IPMMU_VMSA 284d25a2a16SLaurent Pinchart bool "Renesas VMSA-compatible IPMMU" 285d286a58bSRobin Murphy depends on ARCH_RENESAS || COMPILE_TEST 286e332003bSRandy Dunlap depends on ARM || ARM64 || COMPILE_TEST 287d286a58bSRobin Murphy depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE 288d25a2a16SLaurent Pinchart select IOMMU_API 289f20ed39fSLaurent Pinchart select IOMMU_IO_PGTABLE_LPAE 290d25a2a16SLaurent Pinchart select ARM_DMA_USE_IOMMU 291d25a2a16SLaurent Pinchart help 29215021d36SGeert Uytterhoeven Support for the Renesas VMSA-compatible IPMMU found in the R-Mobile 293d714aaa7SLad Prabhakar APE6, R-Car Gen{2,3} and RZ/G{1,2} SoCs. 294d25a2a16SLaurent Pinchart 295d25a2a16SLaurent Pinchart If unsure, say N. 296d25a2a16SLaurent Pinchart 2974e13c1acSAlexey Kardashevskiyconfig SPAPR_TCE_IOMMU 2984e13c1acSAlexey Kardashevskiy bool "sPAPR TCE IOMMU Support" 2999dd124b6SKrzysztof Kozlowski depends on PPC_POWERNV || PPC_PSERIES 3004e13c1acSAlexey Kardashevskiy select IOMMU_API 3014e13c1acSAlexey Kardashevskiy help 3024e13c1acSAlexey Kardashevskiy Enables bits of IOMMU API required by VFIO. The iommu_ops 3034e13c1acSAlexey Kardashevskiy is not implemented as it is not necessary for VFIO. 3044e13c1acSAlexey Kardashevskiy 30546d1fb07SSven Peterconfig APPLE_DART 30646d1fb07SSven Peter tristate "Apple DART IOMMU Support" 307d286a58bSRobin Murphy depends on ARCH_APPLE || COMPILE_TEST 308d286a58bSRobin Murphy depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_DART 30946d1fb07SSven Peter select IOMMU_API 310745ef109SJanne Grunau select IOMMU_IO_PGTABLE_DART 31146d1fb07SSven Peter default ARCH_APPLE 31246d1fb07SSven Peter help 31346d1fb07SSven Peter Support for Apple DART (Device Address Resolution Table) IOMMUs 31446d1fb07SSven Peter found in Apple ARM SoCs like the M1. 31546d1fb07SSven Peter This IOMMU is required for most peripherals using DMA to access 31646d1fb07SSven Peter the main memory. 31746d1fb07SSven Peter 31846d1fb07SSven Peter Say Y here if you are using an Apple SoC. 31946d1fb07SSven Peter 32048ec83bcSWill Deacon# ARM IOMMU support 32145ae7cffSWill Deaconconfig ARM_SMMU 322cd221bd2SWill Deacon tristate "ARM Ltd. System MMU (SMMU) Support" 323d286a58bSRobin Murphy depends on ARM64 || ARM || COMPILE_TEST 324d286a58bSRobin Murphy depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE 32545ae7cffSWill Deacon select IOMMU_API 326518f7136SWill Deacon select IOMMU_IO_PGTABLE_LPAE 32745ae7cffSWill Deacon select ARM_DMA_USE_IOMMU if ARM 32845ae7cffSWill Deacon help 32945ae7cffSWill Deacon Support for implementations of the ARM System MMU architecture 330518f7136SWill Deacon versions 1 and 2. 33145ae7cffSWill Deacon 33245ae7cffSWill Deacon Say Y here if your SoC includes an IOMMU device implementing 33345ae7cffSWill Deacon the ARM SMMU architecture. 33445ae7cffSWill Deacon 335cd221bd2SWill Deaconconfig ARM_SMMU_LEGACY_DT_BINDINGS 336cd221bd2SWill Deacon bool "Support the legacy \"mmu-masters\" devicetree bindings" 337cd221bd2SWill Deacon depends on ARM_SMMU=y && OF 338cd221bd2SWill Deacon help 339cd221bd2SWill Deacon Support for the badly designed and deprecated "mmu-masters" 340cd221bd2SWill Deacon devicetree bindings. This allows some DMA masters to attach 341cd221bd2SWill Deacon to the SMMU but does not provide any support via the DMA API. 342cd221bd2SWill Deacon If you're lucky, you might be able to get VFIO up and running. 343cd221bd2SWill Deacon 344cd221bd2SWill Deacon If you say Y here then you'll make me very sad. Instead, say N 345cd221bd2SWill Deacon and move your firmware to the utopian future that was 2016. 346cd221bd2SWill Deacon 347954a03beSDouglas Andersonconfig ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT 348954a03beSDouglas Anderson bool "Default to disabling bypass on ARM SMMU v1 and v2" 349954a03beSDouglas Anderson depends on ARM_SMMU 350954a03beSDouglas Anderson default y 351954a03beSDouglas Anderson help 352954a03beSDouglas Anderson Say Y here to (by default) disable bypass streams such that 353954a03beSDouglas Anderson incoming transactions from devices that are not attached to 354954a03beSDouglas Anderson an iommu domain will report an abort back to the device and 355954a03beSDouglas Anderson will not be allowed to pass through the SMMU. 356954a03beSDouglas Anderson 357954a03beSDouglas Anderson Any old kernels that existed before this KConfig was 358954a03beSDouglas Anderson introduced would default to _allowing_ bypass (AKA the 359954a03beSDouglas Anderson equivalent of NO for this config). However the default for 360954a03beSDouglas Anderson this option is YES because the old behavior is insecure. 361954a03beSDouglas Anderson 362954a03beSDouglas Anderson There are few reasons to allow unmatched stream bypass, and 363954a03beSDouglas Anderson even fewer good ones. If saying YES here breaks your board 364954a03beSDouglas Anderson you should work on fixing your board. This KConfig option 365954a03beSDouglas Anderson is expected to be removed in the future and we'll simply 366954a03beSDouglas Anderson hardcode the bypass disable in the code. 367954a03beSDouglas Anderson 368954a03beSDouglas Anderson NOTE: the kernel command line parameter 369954a03beSDouglas Anderson 'arm-smmu.disable_bypass' will continue to override this 370954a03beSDouglas Anderson config. 371954a03beSDouglas Anderson 3720f0f80d9SArnd Bergmannconfig ARM_SMMU_QCOM 3730f0f80d9SArnd Bergmann def_tristate y 3740f0f80d9SArnd Bergmann depends on ARM_SMMU && ARCH_QCOM 3750f0f80d9SArnd Bergmann select QCOM_SCM 3760f0f80d9SArnd Bergmann help 3770f0f80d9SArnd Bergmann When running on a Qualcomm platform that has the custom variant 3780f0f80d9SArnd Bergmann of the ARM SMMU, this needs to be built into the SMMU driver. 3790f0f80d9SArnd Bergmann 380b9b721d1SSai Prakash Ranjanconfig ARM_SMMU_QCOM_DEBUG 381b9b721d1SSai Prakash Ranjan bool "ARM SMMU QCOM implementation defined debug support" 382b9b721d1SSai Prakash Ranjan depends on ARM_SMMU_QCOM 383b9b721d1SSai Prakash Ranjan help 384b9b721d1SSai Prakash Ranjan Support for implementation specific debug features in ARM SMMU 385b9b721d1SSai Prakash Ranjan hardware found in QTI platforms. 386b9b721d1SSai Prakash Ranjan 387b9b721d1SSai Prakash Ranjan Say Y here to enable debug for issues such as TLB sync timeouts 388b9b721d1SSai Prakash Ranjan which requires implementation defined register dumps. 389b9b721d1SSai Prakash Ranjan 39048ec83bcSWill Deaconconfig ARM_SMMU_V3 3912852ad05SWill Deacon tristate "ARM Ltd. System MMU Version 3 (SMMUv3) Support" 39208d4ca2aSRobin Murphy depends on ARM64 39348ec83bcSWill Deacon select IOMMU_API 39448ec83bcSWill Deacon select IOMMU_IO_PGTABLE_LPAE 39513e7accbSThomas Gleixner select GENERIC_MSI_IRQ 39648ec83bcSWill Deacon help 39748ec83bcSWill Deacon Support for implementations of the ARM System MMU architecture 39848ec83bcSWill Deacon version 3 providing translation support to a PCIe root complex. 39948ec83bcSWill Deacon 40048ec83bcSWill Deacon Say Y here if your system includes an IOMMU device implementing 40148ec83bcSWill Deacon the ARM SMMUv3 architecture. 40248ec83bcSWill Deacon 4033f1ce8e8SJean-Philippe Bruckerconfig ARM_SMMU_V3_SVA 4043f1ce8e8SJean-Philippe Brucker bool "Shared Virtual Addressing support for the ARM SMMUv3" 4053f1ce8e8SJean-Philippe Brucker depends on ARM_SMMU_V3 4067ba56472SFenghua Yu select IOMMU_SVA 40732784a95SJean-Philippe Brucker select MMU_NOTIFIER 4083f1ce8e8SJean-Philippe Brucker help 4093f1ce8e8SJean-Philippe Brucker Support for sharing process address spaces with devices using the 4103f1ce8e8SJean-Philippe Brucker SMMUv3. 4113f1ce8e8SJean-Philippe Brucker 4123f1ce8e8SJean-Philippe Brucker Say Y here if your system supports SVA extensions such as PCIe PASID 4133f1ce8e8SJean-Philippe Brucker and PRI. 4143f1ce8e8SJean-Philippe Brucker 4158128f23cSGerald Schaeferconfig S390_IOMMU 4168128f23cSGerald Schaefer def_bool y if S390 && PCI 4178128f23cSGerald Schaefer depends on S390 && PCI 4188128f23cSGerald Schaefer select IOMMU_API 4198128f23cSGerald Schaefer help 4208128f23cSGerald Schaefer Support for the IOMMU API for s390 PCI devices. 4218128f23cSGerald Schaefer 4220df4fabeSYong Wuconfig MTK_IOMMU 42318d8c74eSYong Wu tristate "MediaTek IOMMU Support" 4240df4fabeSYong Wu depends on ARCH_MEDIATEK || COMPILE_TEST 4251928832fSArnd Bergmann select ARM_DMA_USE_IOMMU 4260df4fabeSYong Wu select IOMMU_API 4270df4fabeSYong Wu select IOMMU_IO_PGTABLE_ARMV7S 4280df4fabeSYong Wu select MEMORY 4290df4fabeSYong Wu select MTK_SMI 4300df4fabeSYong Wu help 4310df4fabeSYong Wu Support for the M4U on certain Mediatek SOCs. M4U is MultiMedia 4320df4fabeSYong Wu Memory Management Unit. This option enables remapping of DMA memory 4330df4fabeSYong Wu accesses for the multimedia subsystem. 4340df4fabeSYong Wu 4350df4fabeSYong Wu If unsure, say N here. 4360df4fabeSYong Wu 437b17336c5SHonghui Zhangconfig MTK_IOMMU_V1 4388de000cfSYong Wu tristate "MediaTek IOMMU Version 1 (M4U gen1) Support" 439b17336c5SHonghui Zhang depends on ARM 440b17336c5SHonghui Zhang depends on ARCH_MEDIATEK || COMPILE_TEST 441b17336c5SHonghui Zhang select ARM_DMA_USE_IOMMU 442b17336c5SHonghui Zhang select IOMMU_API 443b17336c5SHonghui Zhang select MEMORY 444b17336c5SHonghui Zhang select MTK_SMI 445b17336c5SHonghui Zhang help 446b17336c5SHonghui Zhang Support for the M4U on certain Mediatek SoCs. M4U generation 1 HW is 447b17336c5SHonghui Zhang Multimedia Memory Managememt Unit. This option enables remapping of 448b17336c5SHonghui Zhang DMA memory accesses for the multimedia subsystem. 449b17336c5SHonghui Zhang 450b17336c5SHonghui Zhang if unsure, say N here. 451b17336c5SHonghui Zhang 4520ae349a0SRob Clarkconfig QCOM_IOMMU 4530ae349a0SRob Clark # Note: iommu drivers cannot (yet?) be built as modules 4540ae349a0SRob Clark bool "Qualcomm IOMMU Support" 455d286a58bSRobin Murphy depends on ARCH_QCOM || COMPILE_TEST 456d286a58bSRobin Murphy depends on !GENERIC_ATOMIC64 # for IOMMU_IO_PGTABLE_LPAE 457424953cfSArnd Bergmann select QCOM_SCM 4580ae349a0SRob Clark select IOMMU_API 4590ae349a0SRob Clark select IOMMU_IO_PGTABLE_LPAE 4600ae349a0SRob Clark select ARM_DMA_USE_IOMMU 4610ae349a0SRob Clark help 4620ae349a0SRob Clark Support for IOMMU on certain Qualcomm SoCs. 4630ae349a0SRob Clark 46429217a47SLan Tianyuconfig HYPERV_IOMMU 465fea858dcSNuno Das Neves bool "Hyper-V IRQ Handling" 466d7f0b2e4SBoqun Feng depends on HYPERV && X86 46729217a47SLan Tianyu select IOMMU_API 46829217a47SLan Tianyu default HYPERV 46929217a47SLan Tianyu help 470fea858dcSNuno Das Neves Stub IOMMU driver to handle IRQs to support Hyper-V Linux 471fea858dcSNuno Das Neves guest and root partitions. 47229217a47SLan Tianyu 473edcd69abSJean-Philippe Bruckerconfig VIRTIO_IOMMU 474fa4afd78SJean-Philippe Brucker tristate "Virtio IOMMU driver" 475fa4afd78SJean-Philippe Brucker depends on VIRTIO 4768ce4904bSJean-Philippe Brucker depends on (ARM64 || X86) 477edcd69abSJean-Philippe Brucker select IOMMU_API 478edcd69abSJean-Philippe Brucker select INTERVAL_TREE 4793cf48554SJean-Philippe Brucker select ACPI_VIOT if ACPI 480edcd69abSJean-Philippe Brucker help 481edcd69abSJean-Philippe Brucker Para-virtualised IOMMU driver with virtio. 482edcd69abSJean-Philippe Brucker 483edcd69abSJean-Philippe Brucker Say Y here if you intend to run this kernel as a guest. 484edcd69abSJean-Philippe Brucker 485b23e4fc4SChunyan Zhangconfig SPRD_IOMMU 486b23e4fc4SChunyan Zhang tristate "Unisoc IOMMU Support" 487b23e4fc4SChunyan Zhang depends on ARCH_SPRD || COMPILE_TEST 488b23e4fc4SChunyan Zhang select IOMMU_API 489b23e4fc4SChunyan Zhang help 490b23e4fc4SChunyan Zhang Support for IOMMU on Unisoc's SoCs, this IOMMU can be used by 491b23e4fc4SChunyan Zhang Unisoc's multimedia devices, such as display, Image codec(jpeg) 492b23e4fc4SChunyan Zhang and a few signal processors, including VSP(video), GSP(graphic), 493b23e4fc4SChunyan Zhang ISP(image), and CPP(camera pixel processor), etc. 494b23e4fc4SChunyan Zhang 495b23e4fc4SChunyan Zhang Say Y here if you want to use the multimedia devices listed above. 496b23e4fc4SChunyan Zhang 49768255b62SJoerg Roedelendif # IOMMU_SUPPORT 498