* [PATCH v5 0/6] add generic boot option for IOMMU dma mode
@ 2019-04-09 12:53 Zhen Lei
0 siblings, 0 replies; 7+ messages in thread
From: Zhen Lei @ 2019-04-09 12:53 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
Cc: Hanjun Guo, Zhen Lei
v4 --> v5:
As Hanjun and Thomas Gleixner's suggestion:
1. Keep the old ARCH specific boot options no change.
2. Keep build option CONFIG_IOMMU_DEFAULT_PASSTHROUGH no change.
v4:
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: add generic boot option iommu.dma_mode
iommu: add build options corresponding to iommu.dma_mode
iommu: add iommu_default_dma_mode_get/set() helper
s390/pci: add support for generic boot option iommu.dma_mode
powernv/iommu: add support for generic boot option iommu.dma_mode
x86/iommu: add support for generic boot option iommu.dma_mode
Documentation/admin-guide/kernel-parameters.txt | 19 +++++++
arch/ia64/include/asm/iommu.h | 2 -
arch/ia64/kernel/pci-dma.c | 2 -
arch/powerpc/platforms/powernv/pci-ioda.c | 5 +-
arch/s390/pci/pci_dma.c | 14 ++---
arch/x86/include/asm/iommu.h | 1 -
arch/x86/kernel/pci-dma.c | 35 ++++++------
drivers/iommu/Kconfig | 45 ++++++++++++---
drivers/iommu/amd_iommu.c | 10 ++--
drivers/iommu/amd_iommu_init.c | 4 +-
drivers/iommu/amd_iommu_types.h | 6 --
drivers/iommu/intel-iommu.c | 9 ++-
drivers/iommu/iommu.c | 73 ++++++++++++++++++++-----
include/linux/iommu.h | 23 ++++++++
14 files changed, 176 insertions(+), 72 deletions(-)
--
1.8.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5 0/6] add generic boot option for IOMMU dma mode
@ 2019-04-09 12:53 ` Zhen Lei
0 siblings, 0 replies; 7+ messages in thread
From: Zhen Lei @ 2019-04-09 12:53 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: Zhen Lei, Hanjun Guo
v4 --> v5:
As Hanjun and Thomas Gleixner's suggestion:
1. Keep the old ARCH specific boot options no change.
2. Keep build option CONFIG_IOMMU_DEFAULT_PASSTHROUGH no change.
v4:
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: add generic boot option iommu.dma_mode
iommu: add build options corresponding to iommu.dma_mode
iommu: add iommu_default_dma_mode_get/set() helper
s390/pci: add support for generic boot option iommu.dma_mode
powernv/iommu: add support for generic boot option iommu.dma_mode
x86/iommu: add support for generic boot option iommu.dma_mode
Documentation/admin-guide/kernel-parameters.txt | 19 +++++++
arch/ia64/include/asm/iommu.h | 2 -
arch/ia64/kernel/pci-dma.c | 2 -
arch/powerpc/platforms/powernv/pci-ioda.c | 5 +-
arch/s390/pci/pci_dma.c | 14 ++---
arch/x86/include/asm/iommu.h | 1 -
arch/x86/kernel/pci-dma.c | 35 ++++++------
drivers/iommu/Kconfig | 45 ++++++++++++---
drivers/iommu/amd_iommu.c | 10 ++--
drivers/iommu/amd_iommu_init.c | 4 +-
drivers/iommu/amd_iommu_types.h | 6 --
drivers/iommu/intel-iommu.c | 9 ++-
drivers/iommu/iommu.c | 73 ++++++++++++++++++++-----
include/linux/iommu.h | 23 ++++++++
14 files changed, 176 insertions(+), 72 deletions(-)
--
1.8.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5 0/6] add generic boot option for IOMMU dma mode
@ 2019-04-09 12:53 ` Zhen Lei
0 siblings, 0 replies; 7+ messages in thread
From: Zhen Lei @ 2019-04-09 12:53 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
v4 --> v5:
As Hanjun and Thomas Gleixner's suggestion:
1. Keep the old ARCH specific boot options no change.
2. Keep build option CONFIG_IOMMU_DEFAULT_PASSTHROUGH no change.
v4:
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: add generic boot option iommu.dma_mode
iommu: add build options corresponding to iommu.dma_mode
iommu: add iommu_default_dma_mode_get/set() helper
s390/pci: add support for generic boot option iommu.dma_mode
powernv/iommu: add support for generic boot option iommu.dma_mode
x86/iommu: add support for generic boot option iommu.dma_mode
Documentation/admin-guide/kernel-parameters.txt | 19 +++++++
arch/ia64/include/asm/iommu.h | 2 -
arch/ia64/kernel/pci-dma.c | 2 -
arch/powerpc/platforms/powernv/pci-ioda.c | 5 +-
arch/s390/pci/pci_dma.c | 14 ++---
arch/x86/include/asm/iommu.h | 1 -
arch/x86/kernel/pci-dma.c | 35 ++++++------
drivers/iommu/Kconfig | 45 ++++++++++++---
drivers/iommu/amd_iommu.c | 10 ++--
drivers/iommu/amd_iommu_init.c | 4 +-
drivers/iommu/amd_iommu_types.h | 6 --
drivers/iommu/intel-iommu.c | 9 ++-
drivers/iommu/iommu.c | 73 ++++++++++++++++++++-----
include/linux/iommu.h | 23 ++++++++
14 files changed, 176 insertions(+), 72 deletions(-)
--
1.8.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5 0/6] add generic boot option for IOMMU dma mode
@ 2019-04-09 12:53 Zhen Lei
0 siblings, 0 replies; 7+ messages in thread
From: Zhen Lei @ 2019-04-09 12:53 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
Cc: Hanjun Guo
v4 --> v5:
As Hanjun and Thomas Gleixner's suggestion:
1. Keep the old ARCH specific boot options no change.
2. Keep build option CONFIG_IOMMU_DEFAULT_PASSTHROUGH no change.
v4:
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: add generic boot option iommu.dma_mode
iommu: add build options corresponding to iommu.dma_mode
iommu: add iommu_default_dma_mode_get/set() helper
s390/pci: add support for generic boot option iommu.dma_mode
powernv/iommu: add support for generic boot option iommu.dma_mode
x86/iommu: add support for generic boot option iommu.dma_mode
Documentation/admin-guide/kernel-parameters.txt | 19 +++++++
arch/ia64/include/asm/iommu.h | 2 -
arch/ia64/kernel/pci-dma.c | 2 -
arch/powerpc/platforms/powernv/pci-ioda.c | 5 +-
arch/s390/pci/pci_dma.c | 14 ++---
arch/x86/include/asm/iommu.h | 1 -
arch/x86/kernel/pci-dma.c | 35 ++++++------
drivers/iommu/Kconfig | 45 ++++++++++++---
drivers/iommu/amd_iommu.c | 10 ++--
drivers/iommu/amd_iommu_init.c | 4 +-
drivers/iommu/amd_iommu_types.h | 6 --
drivers/iommu/intel-iommu.c | 9 ++-
drivers/iommu/iommu.c | 73 ++++++++++++++++++++-----
include/linux/iommu.h | 23 ++++++++
14 files changed, 176 insertions(+), 72 deletions(-)
--
1.8.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5 0/6] add generic boot option for IOMMU dma mode
@ 2019-04-09 12:53 Zhen Lei
0 siblings, 0 replies; 7+ messages in thread
From: Zhen Lei @ 2019-04-09 12:53 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
Cc: Hanjun Guo, Zhen Lei
v4 --> v5:
As Hanjun and Thomas Gleixner's suggestion:
1. Keep the old ARCH specific boot options no change.
2. Keep build option CONFIG_IOMMU_DEFAULT_PASSTHROUGH no change.
v4:
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: add generic boot option iommu.dma_mode
iommu: add build options corresponding to iommu.dma_mode
iommu: add iommu_default_dma_mode_get/set() helper
s390/pci: add support for generic boot option iommu.dma_mode
powernv/iommu: add support for generic boot option iommu.dma_mode
x86/iommu: add support for generic boot option iommu.dma_mode
Documentation/admin-guide/kernel-parameters.txt | 19 +++++++
arch/ia64/include/asm/iommu.h | 2 -
arch/ia64/kernel/pci-dma.c | 2 -
arch/powerpc/platforms/powernv/pci-ioda.c | 5 +-
arch/s390/pci/pci_dma.c | 14 ++---
arch/x86/include/asm/iommu.h | 1 -
arch/x86/kernel/pci-dma.c | 35 ++++++------
drivers/iommu/Kconfig | 45 ++++++++++++---
drivers/iommu/amd_iommu.c | 10 ++--
drivers/iommu/amd_iommu_init.c | 4 +-
drivers/iommu/amd_iommu_types.h | 6 --
drivers/iommu/intel-iommu.c | 9 ++-
drivers/iommu/iommu.c | 73 ++++++++++++++++++++-----
include/linux/iommu.h | 23 ++++++++
14 files changed, 176 insertions(+), 72 deletions(-)
--
1.8.3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5 0/6] add generic boot option for IOMMU dma mode
@ 2019-04-09 12:53 ` Zhen Lei
0 siblings, 0 replies; 7+ messages in thread
From: Zhen Lei @ 2019-04-09 12:53 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
v4 --> v5:
As Hanjun and Thomas Gleixner's suggestion:
1. Keep the old ARCH specific boot options no change.
2. Keep build option CONFIG_IOMMU_DEFAULT_PASSTHROUGH no change.
v4:
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: add generic boot option iommu.dma_mode
iommu: add build options corresponding to iommu.dma_mode
iommu: add iommu_default_dma_mode_get/set() helper
s390/pci: add support for generic boot option iommu.dma_mode
powernv/iommu: add support for generic boot option iommu.dma_mode
x86/iommu: add support for generic boot option iommu.dma_mode
Documentation/admin-guide/kernel-parameters.txt | 19 +++++++
arch/ia64/include/asm/iommu.h | 2 -
arch/ia64/kernel/pci-dma.c | 2 -
arch/powerpc/platforms/powernv/pci-ioda.c | 5 +-
arch/s390/pci/pci_dma.c | 14 ++---
arch/x86/include/asm/iommu.h | 1 -
arch/x86/kernel/pci-dma.c | 35 ++++++------
drivers/iommu/Kconfig | 45 ++++++++++++---
drivers/iommu/amd_iommu.c | 10 ++--
drivers/iommu/amd_iommu_init.c | 4 +-
drivers/iommu/amd_iommu_types.h | 6 --
drivers/iommu/intel-iommu.c | 9 ++-
drivers/iommu/iommu.c | 73 ++++++++++++++++++++-----
include/linux/iommu.h | 23 ++++++++
14 files changed, 176 insertions(+), 72 deletions(-)
--
1.8.3
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5 0/6] add generic boot option for IOMMU dma mode
@ 2019-04-09 12:53 ` Zhen Lei
0 siblings, 0 replies; 7+ messages in thread
From: Zhen Lei @ 2019-04-09 12:53 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: Zhen Lei, Hanjun Guo
v4 --> v5:
As Hanjun and Thomas Gleixner's suggestion:
1. Keep the old ARCH specific boot options no change.
2. Keep build option CONFIG_IOMMU_DEFAULT_PASSTHROUGH no change.
v4:
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: add generic boot option iommu.dma_mode
iommu: add build options corresponding to iommu.dma_mode
iommu: add iommu_default_dma_mode_get/set() helper
s390/pci: add support for generic boot option iommu.dma_mode
powernv/iommu: add support for generic boot option iommu.dma_mode
x86/iommu: add support for generic boot option iommu.dma_mode
Documentation/admin-guide/kernel-parameters.txt | 19 +++++++
arch/ia64/include/asm/iommu.h | 2 -
arch/ia64/kernel/pci-dma.c | 2 -
arch/powerpc/platforms/powernv/pci-ioda.c | 5 +-
arch/s390/pci/pci_dma.c | 14 ++---
arch/x86/include/asm/iommu.h | 1 -
arch/x86/kernel/pci-dma.c | 35 ++++++------
drivers/iommu/Kconfig | 45 ++++++++++++---
drivers/iommu/amd_iommu.c | 10 ++--
drivers/iommu/amd_iommu_init.c | 4 +-
drivers/iommu/amd_iommu_types.h | 6 --
drivers/iommu/intel-iommu.c | 9 ++-
drivers/iommu/iommu.c | 73 ++++++++++++++++++++-----
include/linux/iommu.h | 23 ++++++++
14 files changed, 176 insertions(+), 72 deletions(-)
--
1.8.3
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-04-09 13:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-09 12:53 [PATCH v5 0/6] add generic boot option for IOMMU dma mode Zhen Lei
-- strict thread matches above, loose matches on Subject: below --
2019-04-09 12:53 Zhen Lei
2019-04-09 12:53 Zhen Lei
2019-04-09 12:53 Zhen Lei
2019-04-09 12:53 ` Zhen Lei
2019-04-09 12:53 ` Zhen Lei
2019-04-09 12:53 ` Zhen Lei
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.