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 6fa83433cSJean-Philippe Brucker# The IOASID library may also be used by non-IOMMU_API users 7fa83433cSJean-Philippe Bruckerconfig IOASID 8fa83433cSJean-Philippe Brucker tristate 9fa83433cSJean-Philippe Brucker 10ab493a0fSOhad Ben-Cohen# IOMMU_API always gets selected by whoever wants it. 11ab493a0fSOhad Ben-Cohenconfig IOMMU_API 12ab493a0fSOhad Ben-Cohen bool 13b10f127eSOhad Ben-Cohen 1468255b62SJoerg Roedelmenuconfig IOMMU_SUPPORT 1568255b62SJoerg Roedel bool "IOMMU Hardware Support" 16e5144c93SArnd Bergmann depends on MMU 1768255b62SJoerg Roedel default y 18a7f7f624SMasahiro Yamada help 1968255b62SJoerg Roedel Say Y here if you want to compile device drivers for IO Memory 2068255b62SJoerg Roedel Management Units into the kernel. These devices usually allow to 2168255b62SJoerg Roedel remap DMA requests and/or remap interrupts from other devices on the 2268255b62SJoerg Roedel system. 2368255b62SJoerg Roedel 2468255b62SJoerg Roedelif IOMMU_SUPPORT 2568255b62SJoerg Roedel 26fdb1d7beSWill Deaconmenu "Generic IOMMU Pagetable Support" 27fdb1d7beSWill Deacon 28fdb1d7beSWill Deacon# Selected by the actual pagetable implementations 29fdb1d7beSWill Deaconconfig IOMMU_IO_PGTABLE 30fdb1d7beSWill Deacon bool 31fdb1d7beSWill Deacon 32e1d3c0fdSWill Deaconconfig IOMMU_IO_PGTABLE_LPAE 33e1d3c0fdSWill Deacon bool "ARMv7/v8 Long Descriptor Format" 34e1d3c0fdSWill Deacon select IOMMU_IO_PGTABLE 3548e6f765SGeert Uytterhoeven depends on ARM || ARM64 || (COMPILE_TEST && !GENERIC_ATOMIC64) 36e1d3c0fdSWill Deacon help 37e1d3c0fdSWill Deacon Enable support for the ARM long descriptor pagetable format. 38e1d3c0fdSWill Deacon This allocator supports 4K/2M/1G, 16K/32M and 64K/512M page 39e1d3c0fdSWill Deacon sizes at both stage-1 and stage-2, as well as address spaces 40e1d3c0fdSWill Deacon up to 48-bits in size. 41e1d3c0fdSWill Deacon 42fe4b991dSWill Deaconconfig IOMMU_IO_PGTABLE_LPAE_SELFTEST 43fe4b991dSWill Deacon bool "LPAE selftests" 44fe4b991dSWill Deacon depends on IOMMU_IO_PGTABLE_LPAE 45fe4b991dSWill Deacon help 46fe4b991dSWill Deacon Enable self-tests for LPAE page table allocator. This performs 47fe4b991dSWill Deacon a series of page-table consistency checks during boot. 48fe4b991dSWill Deacon 49fe4b991dSWill Deacon If unsure, say N here. 50fe4b991dSWill Deacon 51e5fc9753SRobin Murphyconfig IOMMU_IO_PGTABLE_ARMV7S 52e5fc9753SRobin Murphy bool "ARMv7/v8 Short Descriptor Format" 53e5fc9753SRobin Murphy select IOMMU_IO_PGTABLE 5448e6f765SGeert Uytterhoeven depends on ARM || ARM64 || COMPILE_TEST 55e5fc9753SRobin Murphy help 56e5fc9753SRobin Murphy Enable support for the ARM Short-descriptor pagetable format. 57e5fc9753SRobin Murphy This supports 32-bit virtual and physical addresses mapped using 58e5fc9753SRobin Murphy 2-level tables with 4KB pages/1MB sections, and contiguous entries 59e5fc9753SRobin Murphy for 64KB pages/16MB supersections if indicated by the IOMMU driver. 60e5fc9753SRobin Murphy 61e5fc9753SRobin Murphyconfig IOMMU_IO_PGTABLE_ARMV7S_SELFTEST 62e5fc9753SRobin Murphy bool "ARMv7s selftests" 63e5fc9753SRobin Murphy depends on IOMMU_IO_PGTABLE_ARMV7S 64e5fc9753SRobin Murphy help 65e5fc9753SRobin Murphy Enable self-tests for ARMv7s page table allocator. This performs 66e5fc9753SRobin Murphy a series of page-table consistency checks during boot. 67e5fc9753SRobin Murphy 68e5fc9753SRobin Murphy If unsure, say N here. 69e5fc9753SRobin Murphy 70fdb1d7beSWill Deaconendmenu 71fdb1d7beSWill Deacon 72bad614b2SGary R Hookconfig IOMMU_DEBUGFS 73bad614b2SGary R Hook bool "Export IOMMU internals in DebugFS" 74bad614b2SGary R Hook depends on DEBUG_FS 75bad614b2SGary R Hook help 76bad614b2SGary R Hook Allows exposure of IOMMU device internals. This option enables 77bad614b2SGary R Hook the use of debugfs by IOMMU drivers as required. Devices can, 78bad614b2SGary R Hook at initialization time, cause the IOMMU code to create a top-level 79bad614b2SGary R Hook debug/iommu directory, and then populate a subdirectory with 80bad614b2SGary R Hook entries as required. 81bad614b2SGary R Hook 8258d11317SOlof Johanssonconfig IOMMU_DEFAULT_PASSTHROUGH 8358d11317SOlof Johansson bool "IOMMU passthrough by default" 8458d11317SOlof Johansson depends on IOMMU_API 8558d11317SOlof Johansson help 8658d11317SOlof Johansson Enable passthrough by default, removing the need to pass in 8758d11317SOlof Johansson iommu.passthrough=on or iommu=pt through command line. If this 8858d11317SOlof Johansson is enabled, you can still disable with iommu.passthrough=off 8958d11317SOlof Johansson or iommu=nopt depending on the architecture. 9058d11317SOlof Johansson 9158d11317SOlof Johansson If unsure, say N here. 9258d11317SOlof Johansson 934e0ee78fSHiroshi Doyuconfig OF_IOMMU 944e0ee78fSHiroshi Doyu def_bool y 957eba1d51SWill Deacon depends on OF && IOMMU_API 964e0ee78fSHiroshi Doyu 970db2e5d1SRobin Murphy# IOMMU-agnostic DMA-mapping layer 980db2e5d1SRobin Murphyconfig IOMMU_DMA 990db2e5d1SRobin Murphy bool 1000db2e5d1SRobin Murphy select IOMMU_API 1010db2e5d1SRobin Murphy select IOMMU_IOVA 102ece6e6f0SJulien Grall select IRQ_MSI_IOMMU 10359a68eb8SRobin Murphy select NEED_SG_DMA_LENGTH 1040db2e5d1SRobin Murphy 105695093e3SVarun Sethiconfig FSL_PAMU 106695093e3SVarun Sethi bool "Freescale IOMMU support" 107a4d98fb3SJoerg Roedel depends on PCI 108af29d9faSJoerg Roedel depends on PHYS_64BIT 109a0d284d2SAndy Fleming depends on PPC_E500MC || (COMPILE_TEST && PPC) 110695093e3SVarun Sethi select IOMMU_API 111695093e3SVarun Sethi select GENERIC_ALLOCATOR 112695093e3SVarun Sethi help 113695093e3SVarun Sethi Freescale PAMU support. PAMU is the IOMMU present on Freescale QorIQ platforms. 114695093e3SVarun Sethi PAMU can authorize memory access, remap the memory address, and remap I/O 115695093e3SVarun Sethi transaction types. 116695093e3SVarun Sethi 117b10f127eSOhad Ben-Cohen# MSM IOMMU support 118b10f127eSOhad Ben-Cohenconfig MSM_IOMMU 119b10f127eSOhad Ben-Cohen bool "MSM IOMMU Support" 120477ab7a1SJoerg Roedel depends on ARM 121477ab7a1SJoerg Roedel depends on ARCH_MSM8X60 || ARCH_MSM8960 || COMPILE_TEST 122b10f127eSOhad Ben-Cohen select IOMMU_API 123c9220fbdSSricharan R select IOMMU_IO_PGTABLE_ARMV7S 124b10f127eSOhad Ben-Cohen help 125b10f127eSOhad Ben-Cohen Support for the IOMMUs found on certain Qualcomm SOCs. 126b10f127eSOhad Ben-Cohen These IOMMUs allow virtualization of the address space used by most 127b10f127eSOhad Ben-Cohen cores within the multimedia subsystem. 128b10f127eSOhad Ben-Cohen 129b10f127eSOhad Ben-Cohen If unsure, say N here. 130b10f127eSOhad Ben-Cohen 13129b68415SOhad Ben-Cohen# AMD IOMMU support 13229b68415SOhad Ben-Cohenconfig AMD_IOMMU 13329b68415SOhad Ben-Cohen bool "AMD IOMMU support" 13429b68415SOhad Ben-Cohen select SWIOTLB 13529b68415SOhad Ben-Cohen select PCI_MSI 13652815b75SJoerg Roedel select PCI_ATS 13752815b75SJoerg Roedel select PCI_PRI 13852815b75SJoerg Roedel select PCI_PASID 13929b68415SOhad Ben-Cohen select IOMMU_API 140a72c4225SJoerg Roedel select IOMMU_IOVA 141be62dbf5STom Murphy select IOMMU_DMA 1420dbc6078SThomas Petazzoni depends on X86_64 && PCI && ACPI 143a7f7f624SMasahiro Yamada help 14429b68415SOhad Ben-Cohen With this option you can enable support for AMD IOMMU hardware in 14529b68415SOhad Ben-Cohen your system. An IOMMU is a hardware component which provides 14629b68415SOhad Ben-Cohen remapping of DMA memory accesses from devices. With an AMD IOMMU you 14759bf8964SMasanari Iida can isolate the DMA memory of different devices and protect the 14829b68415SOhad Ben-Cohen system from misbehaving device drivers or hardware. 14929b68415SOhad Ben-Cohen 15029b68415SOhad Ben-Cohen You can find out if your system has an AMD IOMMU if you look into 15129b68415SOhad Ben-Cohen your BIOS for an option to enable it or if you have an IVRS ACPI 15229b68415SOhad Ben-Cohen table. 15329b68415SOhad Ben-Cohen 154e3c495c7SJoerg Roedelconfig AMD_IOMMU_V2 155a446e219SKees Cook tristate "AMD IOMMU Version 2 driver" 156e5cac32cSBorislav Petkov depends on AMD_IOMMU 1578736b2c3SJoerg Roedel select MMU_NOTIFIER 158a7f7f624SMasahiro Yamada help 159e3c495c7SJoerg Roedel This option enables support for the AMD IOMMUv2 features of the IOMMU 160e3c495c7SJoerg Roedel hardware. Select this option if you want to use devices that support 16159bf8964SMasanari Iida the PCI PRI and PASID interface. 162e3c495c7SJoerg Roedel 1637d0f5fd3SGary R Hookconfig AMD_IOMMU_DEBUGFS 1647d0f5fd3SGary R Hook bool "Enable AMD IOMMU internals in DebugFS" 1657d0f5fd3SGary R Hook depends on AMD_IOMMU && IOMMU_DEBUGFS 166a7f7f624SMasahiro Yamada help 1677d0f5fd3SGary R Hook !!!WARNING!!! !!!WARNING!!! !!!WARNING!!! !!!WARNING!!! 1687d0f5fd3SGary R Hook 1697d0f5fd3SGary R Hook DO NOT ENABLE THIS OPTION UNLESS YOU REALLY, -REALLY- KNOW WHAT YOU ARE DOING!!! 1707d0f5fd3SGary R Hook Exposes AMD IOMMU device internals in DebugFS. 1717d0f5fd3SGary R Hook 1727d0f5fd3SGary R Hook This option is -NOT- intended for production environments, and should 1737d0f5fd3SGary R Hook not generally be enabled. 1747d0f5fd3SGary R Hook 175ab65ba57SJerry Snitselaarsource "drivers/iommu/intel/Kconfig" 17604618252SLu Baolu 177d3f13810SSuresh Siddhaconfig IRQ_REMAP 178a446e219SKees Cook bool "Support for Interrupt Remapping" 179a446e219SKees Cook depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI 180d3f13810SSuresh Siddha select DMAR_TABLE 181a7f7f624SMasahiro Yamada help 182166e9278SOhad Ben-Cohen Supports Interrupt remapping for IO-APIC and MSI devices. 183166e9278SOhad Ben-Cohen To use x2apic mode in the CPU's which support x2APIC enhancements or 184166e9278SOhad Ben-Cohen to support platforms with CPU's having > 8 bit APIC ID, say Y. 18568255b62SJoerg Roedel 186fcf3a6efSOhad Ben-Cohen# OMAP IOMMU support 187fcf3a6efSOhad Ben-Cohenconfig OMAP_IOMMU 188fcf3a6efSOhad Ben-Cohen bool "OMAP IOMMU Support" 189477ab7a1SJoerg Roedel depends on ARCH_OMAP2PLUS || COMPILE_TEST 190fcf3a6efSOhad Ben-Cohen select IOMMU_API 191a7f7f624SMasahiro Yamada help 19206b718c0SGerd Hoffmann The OMAP3 media platform drivers depend on iommu support, 19306b718c0SGerd Hoffmann if you need them say Y here. 194fcf3a6efSOhad Ben-Cohen 195fcf3a6efSOhad Ben-Cohenconfig OMAP_IOMMU_DEBUG 19661c75352SSuman Anna bool "Export OMAP IOMMU internals in DebugFS" 197baaa7b5dSLaurent Pinchart depends on OMAP_IOMMU && DEBUG_FS 198a7f7f624SMasahiro Yamada help 199fcf3a6efSOhad Ben-Cohen Select this to see extensive information about 200baaa7b5dSLaurent Pinchart the internal state of OMAP IOMMU in debugfs. 201fcf3a6efSOhad Ben-Cohen 202fcf3a6efSOhad Ben-Cohen Say N unless you know you need this. 203fcf3a6efSOhad Ben-Cohen 204c68a2921SDaniel Kurtzconfig ROCKCHIP_IOMMU 205c68a2921SDaniel Kurtz bool "Rockchip IOMMU Support" 20611175886SJoerg Roedel depends on ARCH_ROCKCHIP || COMPILE_TEST 207c68a2921SDaniel Kurtz select IOMMU_API 208c68a2921SDaniel Kurtz select ARM_DMA_USE_IOMMU 209c68a2921SDaniel Kurtz help 210c68a2921SDaniel Kurtz Support for IOMMUs found on Rockchip rk32xx SOCs. 211c68a2921SDaniel Kurtz These IOMMUs allow virtualization of the address space used by most 212c68a2921SDaniel Kurtz cores within the multimedia subsystem. 213c68a2921SDaniel Kurtz Say Y here if you are using a Rockchip SoC that includes an IOMMU 214c68a2921SDaniel Kurtz device. 215c68a2921SDaniel Kurtz 2164100b8c2SMaxime Ripardconfig SUN50I_IOMMU 2174100b8c2SMaxime Ripard bool "Allwinner H6 IOMMU Support" 2184100b8c2SMaxime Ripard depends on ARCH_SUNXI || COMPILE_TEST 2194100b8c2SMaxime Ripard select ARM_DMA_USE_IOMMU 2204100b8c2SMaxime Ripard select IOMMU_API 2214100b8c2SMaxime Ripard help 2224100b8c2SMaxime Ripard Support for the IOMMU introduced in the Allwinner H6 SoCs. 2234100b8c2SMaxime Ripard 224d53e54b4SHiroshi DOYUconfig TEGRA_IOMMU_GART 225d53e54b4SHiroshi DOYU bool "Tegra GART IOMMU Support" 226d53e54b4SHiroshi DOYU depends on ARCH_TEGRA_2x_SOC 227ce2785a7SDmitry Osipenko depends on TEGRA_MC 228d53e54b4SHiroshi DOYU select IOMMU_API 229d53e54b4SHiroshi DOYU help 230d53e54b4SHiroshi DOYU Enables support for remapping discontiguous physical memory 231d53e54b4SHiroshi DOYU shared with the operating system into contiguous I/O virtual 232d53e54b4SHiroshi DOYU space through the GART (Graphics Address Relocation Table) 233d53e54b4SHiroshi DOYU hardware included on Tegra SoCs. 234d53e54b4SHiroshi DOYU 2357a31f6f4SHiroshi DOYUconfig TEGRA_IOMMU_SMMU 23689184651SThierry Reding bool "NVIDIA Tegra SMMU Support" 23789184651SThierry Reding depends on ARCH_TEGRA 23889184651SThierry Reding depends on TEGRA_AHB 23989184651SThierry Reding depends on TEGRA_MC 2407a31f6f4SHiroshi DOYU select IOMMU_API 2417a31f6f4SHiroshi DOYU help 24289184651SThierry Reding This driver supports the IOMMU hardware (SMMU) found on NVIDIA Tegra 243588c43a7SThierry Reding SoCs (Tegra30 up to Tegra210). 2447a31f6f4SHiroshi DOYU 2452a96536eSKyongHo Choconfig EXYNOS_IOMMU 2462a96536eSKyongHo Cho bool "Exynos IOMMU Support" 247b4ceb4a5SRobin Murphy depends on ARCH_EXYNOS || COMPILE_TEST 248db3a7fd7SArnd Bergmann depends on !CPU_BIG_ENDIAN # revisit driver if we can enable big-endian ptes 2492a96536eSKyongHo Cho select IOMMU_API 2504802c1d0STushar Behera select ARM_DMA_USE_IOMMU 2512a96536eSKyongHo Cho help 2522a96536eSKyongHo Cho Support for the IOMMU (System MMU) of Samsung Exynos application 2535455d700SSachin Kamat processor family. This enables H/W multimedia accelerators to see 2545455d700SSachin Kamat non-linear physical memory chunks as linear memory in their 2555455d700SSachin Kamat address space. 2562a96536eSKyongHo Cho 2572a96536eSKyongHo Cho If unsure, say N here. 2582a96536eSKyongHo Cho 2592a96536eSKyongHo Choconfig EXYNOS_IOMMU_DEBUG 2602a96536eSKyongHo Cho bool "Debugging log for Exynos IOMMU" 2612a96536eSKyongHo Cho depends on EXYNOS_IOMMU 2622a96536eSKyongHo Cho help 2632a96536eSKyongHo Cho Select this to see the detailed log message that shows what 2645455d700SSachin Kamat happens in the IOMMU driver. 2652a96536eSKyongHo Cho 2665455d700SSachin Kamat Say N unless you need kernel log message for IOMMU debugging. 2672a96536eSKyongHo Cho 268d25a2a16SLaurent Pinchartconfig IPMMU_VMSA 269d25a2a16SLaurent Pinchart bool "Renesas VMSA-compatible IPMMU" 270a4aaecccSGuenter Roeck depends on ARCH_RENESAS || (COMPILE_TEST && !GENERIC_ATOMIC64) 271d25a2a16SLaurent Pinchart select IOMMU_API 272f20ed39fSLaurent Pinchart select IOMMU_IO_PGTABLE_LPAE 273d25a2a16SLaurent Pinchart select ARM_DMA_USE_IOMMU 274d25a2a16SLaurent Pinchart help 27515021d36SGeert Uytterhoeven Support for the Renesas VMSA-compatible IPMMU found in the R-Mobile 27615021d36SGeert Uytterhoeven APE6, R-Car Gen2, and R-Car Gen3 SoCs. 277d25a2a16SLaurent Pinchart 278d25a2a16SLaurent Pinchart If unsure, say N. 279d25a2a16SLaurent Pinchart 2804e13c1acSAlexey Kardashevskiyconfig SPAPR_TCE_IOMMU 2814e13c1acSAlexey Kardashevskiy bool "sPAPR TCE IOMMU Support" 2829dd124b6SKrzysztof Kozlowski depends on PPC_POWERNV || PPC_PSERIES 2834e13c1acSAlexey Kardashevskiy select IOMMU_API 2844e13c1acSAlexey Kardashevskiy help 2854e13c1acSAlexey Kardashevskiy Enables bits of IOMMU API required by VFIO. The iommu_ops 2864e13c1acSAlexey Kardashevskiy is not implemented as it is not necessary for VFIO. 2874e13c1acSAlexey Kardashevskiy 28848ec83bcSWill Deacon# ARM IOMMU support 28945ae7cffSWill Deaconconfig ARM_SMMU 290cd221bd2SWill Deacon tristate "ARM Ltd. System MMU (SMMU) Support" 291b4ceb4a5SRobin Murphy depends on ARM64 || ARM || (COMPILE_TEST && !GENERIC_ATOMIC64) 29245ae7cffSWill Deacon select IOMMU_API 293518f7136SWill Deacon select IOMMU_IO_PGTABLE_LPAE 29445ae7cffSWill Deacon select ARM_DMA_USE_IOMMU if ARM 29545ae7cffSWill Deacon help 29645ae7cffSWill Deacon Support for implementations of the ARM System MMU architecture 297518f7136SWill Deacon versions 1 and 2. 29845ae7cffSWill Deacon 29945ae7cffSWill Deacon Say Y here if your SoC includes an IOMMU device implementing 30045ae7cffSWill Deacon the ARM SMMU architecture. 30145ae7cffSWill Deacon 302cd221bd2SWill Deaconconfig ARM_SMMU_LEGACY_DT_BINDINGS 303cd221bd2SWill Deacon bool "Support the legacy \"mmu-masters\" devicetree bindings" 304cd221bd2SWill Deacon depends on ARM_SMMU=y && OF 305cd221bd2SWill Deacon help 306cd221bd2SWill Deacon Support for the badly designed and deprecated "mmu-masters" 307cd221bd2SWill Deacon devicetree bindings. This allows some DMA masters to attach 308cd221bd2SWill Deacon to the SMMU but does not provide any support via the DMA API. 309cd221bd2SWill Deacon If you're lucky, you might be able to get VFIO up and running. 310cd221bd2SWill Deacon 311cd221bd2SWill Deacon If you say Y here then you'll make me very sad. Instead, say N 312cd221bd2SWill Deacon and move your firmware to the utopian future that was 2016. 313cd221bd2SWill Deacon 314954a03beSDouglas Andersonconfig ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT 315954a03beSDouglas Anderson bool "Default to disabling bypass on ARM SMMU v1 and v2" 316954a03beSDouglas Anderson depends on ARM_SMMU 317954a03beSDouglas Anderson default y 318954a03beSDouglas Anderson help 319954a03beSDouglas Anderson Say Y here to (by default) disable bypass streams such that 320954a03beSDouglas Anderson incoming transactions from devices that are not attached to 321954a03beSDouglas Anderson an iommu domain will report an abort back to the device and 322954a03beSDouglas Anderson will not be allowed to pass through the SMMU. 323954a03beSDouglas Anderson 324954a03beSDouglas Anderson Any old kernels that existed before this KConfig was 325954a03beSDouglas Anderson introduced would default to _allowing_ bypass (AKA the 326954a03beSDouglas Anderson equivalent of NO for this config). However the default for 327954a03beSDouglas Anderson this option is YES because the old behavior is insecure. 328954a03beSDouglas Anderson 329954a03beSDouglas Anderson There are few reasons to allow unmatched stream bypass, and 330954a03beSDouglas Anderson even fewer good ones. If saying YES here breaks your board 331954a03beSDouglas Anderson you should work on fixing your board. This KConfig option 332954a03beSDouglas Anderson is expected to be removed in the future and we'll simply 333954a03beSDouglas Anderson hardcode the bypass disable in the code. 334954a03beSDouglas Anderson 335954a03beSDouglas Anderson NOTE: the kernel command line parameter 336954a03beSDouglas Anderson 'arm-smmu.disable_bypass' will continue to override this 337954a03beSDouglas Anderson config. 338954a03beSDouglas Anderson 33948ec83bcSWill Deaconconfig ARM_SMMU_V3 3402852ad05SWill Deacon tristate "ARM Ltd. System MMU Version 3 (SMMUv3) Support" 34108d4ca2aSRobin Murphy depends on ARM64 34248ec83bcSWill Deacon select IOMMU_API 34348ec83bcSWill Deacon select IOMMU_IO_PGTABLE_LPAE 344166bdbd2SMarc Zyngier select GENERIC_MSI_IRQ_DOMAIN 34548ec83bcSWill Deacon help 34648ec83bcSWill Deacon Support for implementations of the ARM System MMU architecture 34748ec83bcSWill Deacon version 3 providing translation support to a PCIe root complex. 34848ec83bcSWill Deacon 34948ec83bcSWill Deacon Say Y here if your system includes an IOMMU device implementing 35048ec83bcSWill Deacon the ARM SMMUv3 architecture. 35148ec83bcSWill Deacon 3528128f23cSGerald Schaeferconfig S390_IOMMU 3538128f23cSGerald Schaefer def_bool y if S390 && PCI 3548128f23cSGerald Schaefer depends on S390 && PCI 3558128f23cSGerald Schaefer select IOMMU_API 3568128f23cSGerald Schaefer help 3578128f23cSGerald Schaefer Support for the IOMMU API for s390 PCI devices. 3588128f23cSGerald Schaefer 35963f1934dSDong Jia Shiconfig S390_CCW_IOMMU 36063f1934dSDong Jia Shi bool "S390 CCW IOMMU Support" 361e93a1695SKrzysztof Kozlowski depends on S390 && CCW || COMPILE_TEST 36263f1934dSDong Jia Shi select IOMMU_API 36363f1934dSDong Jia Shi help 36463f1934dSDong Jia Shi Enables bits of IOMMU API required by VFIO. The iommu_ops 36563f1934dSDong Jia Shi is not implemented as it is not necessary for VFIO. 36663f1934dSDong Jia Shi 3671fde5734STony Krowiakconfig S390_AP_IOMMU 3681fde5734STony Krowiak bool "S390 AP IOMMU Support" 369e93a1695SKrzysztof Kozlowski depends on S390 && ZCRYPT || COMPILE_TEST 3701fde5734STony Krowiak select IOMMU_API 3711fde5734STony Krowiak help 3721fde5734STony Krowiak Enables bits of IOMMU API required by VFIO. The iommu_ops 3731fde5734STony Krowiak is not implemented as it is not necessary for VFIO. 3741fde5734STony Krowiak 3750df4fabeSYong Wuconfig MTK_IOMMU 3760df4fabeSYong Wu bool "MTK IOMMU Support" 3770df4fabeSYong Wu depends on ARCH_MEDIATEK || COMPILE_TEST 3781928832fSArnd Bergmann select ARM_DMA_USE_IOMMU 3790df4fabeSYong Wu select IOMMU_API 3800df4fabeSYong Wu select IOMMU_IO_PGTABLE_ARMV7S 3810df4fabeSYong Wu select MEMORY 3820df4fabeSYong Wu select MTK_SMI 3830df4fabeSYong Wu help 3840df4fabeSYong Wu Support for the M4U on certain Mediatek SOCs. M4U is MultiMedia 3850df4fabeSYong Wu Memory Management Unit. This option enables remapping of DMA memory 3860df4fabeSYong Wu accesses for the multimedia subsystem. 3870df4fabeSYong Wu 3880df4fabeSYong Wu If unsure, say N here. 3890df4fabeSYong Wu 390b17336c5SHonghui Zhangconfig MTK_IOMMU_V1 391b17336c5SHonghui Zhang bool "MTK IOMMU Version 1 (M4U gen1) Support" 392b17336c5SHonghui Zhang depends on ARM 393b17336c5SHonghui Zhang depends on ARCH_MEDIATEK || COMPILE_TEST 394b17336c5SHonghui Zhang select ARM_DMA_USE_IOMMU 395b17336c5SHonghui Zhang select IOMMU_API 396b17336c5SHonghui Zhang select MEMORY 397b17336c5SHonghui Zhang select MTK_SMI 398b17336c5SHonghui Zhang help 399b17336c5SHonghui Zhang Support for the M4U on certain Mediatek SoCs. M4U generation 1 HW is 400b17336c5SHonghui Zhang Multimedia Memory Managememt Unit. This option enables remapping of 401b17336c5SHonghui Zhang DMA memory accesses for the multimedia subsystem. 402b17336c5SHonghui Zhang 403b17336c5SHonghui Zhang if unsure, say N here. 404b17336c5SHonghui Zhang 4050ae349a0SRob Clarkconfig QCOM_IOMMU 4060ae349a0SRob Clark # Note: iommu drivers cannot (yet?) be built as modules 4070ae349a0SRob Clark bool "Qualcomm IOMMU Support" 408a4aaecccSGuenter Roeck depends on ARCH_QCOM || (COMPILE_TEST && !GENERIC_ATOMIC64) 4090ae349a0SRob Clark select IOMMU_API 4100ae349a0SRob Clark select IOMMU_IO_PGTABLE_LPAE 4110ae349a0SRob Clark select ARM_DMA_USE_IOMMU 4120ae349a0SRob Clark help 4130ae349a0SRob Clark Support for IOMMU on certain Qualcomm SoCs. 4140ae349a0SRob Clark 41529217a47SLan Tianyuconfig HYPERV_IOMMU 41629217a47SLan Tianyu bool "Hyper-V x2APIC IRQ Handling" 417d7f0b2e4SBoqun Feng depends on HYPERV && X86 41829217a47SLan Tianyu select IOMMU_API 41929217a47SLan Tianyu default HYPERV 42029217a47SLan Tianyu help 42129217a47SLan Tianyu Stub IOMMU driver to handle IRQs as to allow Hyper-V Linux 42229217a47SLan Tianyu guests to run with x2APIC mode enabled. 42329217a47SLan Tianyu 424edcd69abSJean-Philippe Bruckerconfig VIRTIO_IOMMU 425fa4afd78SJean-Philippe Brucker tristate "Virtio IOMMU driver" 426fa4afd78SJean-Philippe Brucker depends on VIRTIO 427edcd69abSJean-Philippe Brucker depends on ARM64 428edcd69abSJean-Philippe Brucker select IOMMU_API 429edcd69abSJean-Philippe Brucker select INTERVAL_TREE 430edcd69abSJean-Philippe Brucker help 431edcd69abSJean-Philippe Brucker Para-virtualised IOMMU driver with virtio. 432edcd69abSJean-Philippe Brucker 433edcd69abSJean-Philippe Brucker Say Y here if you intend to run this kernel as a guest. 434edcd69abSJean-Philippe Brucker 43568255b62SJoerg Roedelendif # IOMMU_SUPPORT 436