Skip to content

normalize IOMMU dma mode boot options

Zhen Lei linux-doc linux-ia64 linux-iommu linux-s390 linuxppc-dev lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v4 Latest6 patches 7 repliesIn review

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6iommu: use iommu.dma_mode to replace iommu.passthrough and iommu.strictDocumentation/admin-guide/kernel-parameters.txt drivers/iommu/Kconfig drivers/iommu/iommu.c +1 more+50 -400 replies
2/6iommu: keep dma mode build options consistent with cmdline optionsdrivers/iommu/Kconfig drivers/iommu/iommu.c+30 -40 replies
2/6iommu: keep dma mode build options consistent with cmdline optionsdrivers/iommu/Kconfig drivers/iommu/iommu.c+30 -40 replies
2/6iommu: keep dma mode build options consistent with cmdline optionsdrivers/iommu/Kconfig drivers/iommu/iommu.c+30 -40 replies
3/6iommu: add iommu_default_dma_mode_get() helperdrivers/iommu/iommu.c include/linux/iommu.h+19 -40 replies
3/6iommu: add iommu_default_dma_mode_get() helperdrivers/iommu/iommu.c include/linux/iommu.h+19 -40 replies
3/6iommu: add iommu_default_dma_mode_get() helperdrivers/iommu/iommu.c include/linux/iommu.h+19 -40 replies
4/6s390/pci: use common boot option iommu.dma_modeDocumentation/admin-guide/kernel-parameters.txt arch/s390/pci/pci_dma.c drivers/iommu/Kconfig+6 -220 replies
4/6s390/pci: use common boot option iommu.dma_modeDocumentation/admin-guide/kernel-parameters.txt arch/s390/pci/pci_dma.c drivers/iommu/Kconfig+6 -220 replies
4/6s390/pci: use common boot option iommu.dma_modeDocumentation/admin-guide/kernel-parameters.txt arch/s390/pci/pci_dma.c drivers/iommu/Kconfig+6 -220 replies
5/6powernv/iommu: use common boot option iommu.dma_modeDocumentation/admin-guide/kernel-parameters.txt arch/powerpc/platforms/powernv/pci-ioda.c drivers/iommu/Kconfig+2 -240 replies
5/6powernv/iommu: use common boot option iommu.dma_modeDocumentation/admin-guide/kernel-parameters.txt arch/powerpc/platforms/powernv/pci-ioda.c drivers/iommu/Kconfig+2 -240 replies
5/6powernv/iommu: use common boot option iommu.dma_modeDocumentation/admin-guide/kernel-parameters.txt arch/powerpc/platforms/powernv/pci-ioda.c drivers/iommu/Kconfig+2 -240 replies
6/6x86/iommu: use common boot option iommu.dma_modearch/ia64/include/asm/iommu.h arch/ia64/kernel/pci-dma.c arch/x86/include/asm/iommu.h +6 more+14 -540 replies
6/6x86/iommu: use common boot option iommu.dma_modearch/ia64/include/asm/iommu.h arch/ia64/kernel/pci-dma.c arch/x86/include/asm/iommu.h +6 more+14 -540 replies
6/6x86/iommu: use common boot option iommu.dma_modearch/ia64/include/asm/iommu.h arch/ia64/kernel/pci-dma.c arch/x86/include/asm/iommu.h +6 more+14 -540 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/6] normalize IOMMU dma mode boot options

As Robin Murphy's suggestion:
"It's also not necessarily obvious to the user how this interacts with IOMMU_DEFAULT_PASSTHROUGH, so if we really do go down this route, maybe it would be better to refactor the whole lot into a single selection of something like IOMMU_DEFAULT_MODE anyway."

In this version, I tried to normalize the IOMMU dma mode boot options for all ARCHs. When IOMMU is enabled, there are 3 dma modes: paasthrough(bypass), lazy(mapping but defer the IOTLB invalidation), strict. But currently each ARCHs defined their private boot options, different with each other. For example, to enable/disable "passthrough", ARM64 use iommu.passthrough=1/0, X86 use iommu=pt/nopt, PPC/POWERNV use iommu=nobypass.

Zhen Lei (6):
iommu: use iommu.dma_mode to replace iommu.passthrough and
iommu.strict
iommu: keep dma mode build options consistent with cmdline options
iommu: add iommu_default_dma_mode_get() helper s390/pci: use common boot option iommu.dma_mode powernv/iommu: use common boot option iommu.dma_mode x86/iommu: use common boot option iommu.dma_mode

 Documentation/admin-guide/kernel-parameters.txt | 42 +++++++-------------
 arch/ia64/include/asm/iommu.h                   |  2 -
 arch/ia64/kernel/pci-dma.c                      |  2 -
 arch/powerpc/platforms/powernv/pci-ioda.c       | 23 +----------
 arch/s390/pci/pci_dma.c                         | 20 +++-------
 arch/x86/include/asm/iommu.h                    |  1 -
 arch/x86/kernel/pci-dma.c                       | 20 ----------
 drivers/iommu/Kconfig                           | 36 ++++++++++++++---
 drivers/iommu/amd_iommu.c                       | 12 +++---
 drivers/iommu/amd_iommu_init.c                  |  4 --
 drivers/iommu/amd_iommu_types.h                 |  6 ---
 drivers/iommu/intel-iommu.c                     |  7 +---
 drivers/iommu/iommu.c                           | 52 ++++++++++++++++---------
 include/linux/iommu.h                           | 16 ++++++++
 14 files changed, 108 insertions(+), 135 deletions(-)
Signature · 1 line
1.8.3