linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/6] normalize IOMMU dma mode boot options
@ 2019-04-07 12:41 Zhen Lei
  2019-04-07 12:41 ` [PATCH v4 1/6] iommu: use iommu.dma_mode to replace iommu.passthrough and iommu.strict Zhen Lei
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Zhen Lei @ 2019-04-07 12:41 UTC (permalink / raw)
  To: Jean-Philippe Brucker, John Garry, Robin Murphy, Will Deacon,
	Joerg Roedel, Jonathan Corbet, linux-doc, Sebastian Ott,
	Gerald Schaefer, Martin Schwidefsky, Heiko Carstens,
	Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	Tony Luck, Fenghua Yu, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, H . Peter Anvin, David Woodhouse, iommu,
	linux-kernel, linux-s390, linuxppc-dev, x86, linux-ia64
  Cc: Hanjun Guo, Zhen Lei

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(-)

-- 
1.8.3



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-04-08  9:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-07 12:41 [PATCH v4 0/6] normalize IOMMU dma mode boot options Zhen Lei
2019-04-07 12:41 ` [PATCH v4 1/6] iommu: use iommu.dma_mode to replace iommu.passthrough and iommu.strict Zhen Lei
2019-04-07 12:41 ` [PATCH v4 2/6] iommu: keep dma mode build options consistent with cmdline options Zhen Lei
2019-04-07 12:41 ` [PATCH v4 3/6] iommu: add iommu_default_dma_mode_get() helper Zhen Lei
2019-04-07 12:41 ` [PATCH v4 4/6] s390/pci: use common boot option iommu.dma_mode Zhen Lei
2019-04-07 12:41 ` [PATCH v4 5/6] powernv/iommu: " Zhen Lei
2019-04-07 12:41 ` [PATCH v4 6/6] x86/iommu: " Zhen Lei
2019-04-08  1:14 ` [PATCH v4 0/6] normalize IOMMU dma mode boot options Hanjun Guo
2019-04-08  3:16   ` Leizhen (ThunderTown)
2019-04-08  6:32     ` Thomas Gleixner
2019-04-08  9:51       ` Leizhen (ThunderTown)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).