/3. See below:
CMD_SYNCs reduced: 19542181
CMD_SYNCs total:58098548(include reduced)
CMDs total: 116197099 (TLBI:SYNC about 1:1)
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 22 +++---
1 file changed, 19 insertions(+), 3 deletions
cute cmd1
smmu execute TLBI
smmu execute cmd0
poll timeout, because msidata=1 is overridden by
cmd0, that means VAL=0, sync_idx=1.
Zhen Lei (2):
iommu/arm-smmu-v3: fix unexpected CMD_SYNC timeout
iommu/arm-smmu-v3: avoid
Avoid below warning when new capabilities added:
drivers/iommu/amd_iommu.c: In function 'amd_iommu_capable':
drivers/iommu/amd_iommu.c:3053:2: warning: enumeration value
'IOMMU_CAP_NON_STRICT' not handled in switch [-Wswitch]
switch (cap) {
Signed-off-by: Zhen Lei
---
drivers/iommu
Stream bypass is not security. A malicious device can be hot plugged
without match any drivers, but it can access to any memory. So change to
disable bypass by default.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
1. Add IOMMU_CAP_NON_STRICT capability.
2. Dynamic choose strict or non-strict mode base on the iommu domain type.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm
compatible with
other IOMMUs which still use strict mode.
Signed-off-by: Zhen Lei
---
drivers/iommu/io-pgtable-arm.c | 23 ++-
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c
index 010a254..9234db3
Because the non-strict mode introduces a vulnerability window, so add a
bootup option to make the manager can choose which mode to be used. The
default mode is IOMMU_STRICT.
Signed-off-by: Zhen Lei
---
Documentation/admin-guide/kernel-parameters.txt | 12 ++
drivers/iommu/arm-smmu-v3.c
l queue_iova to
put off iova freeing.
Signed-off-by: Zhen Lei
---
drivers/iommu/dma-iommu.c | 25 +
include/linux/iommu.h | 7 +++
2 files changed, 32 insertions(+)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index ddcbbdb..9f0c77a 100644
-
on APIs to
unmap, but Intel and AMD IOMMU drivers are not.
Below is the performance data of strict vs non-strict for NVMe device:
Randomly Read IOPS: 146K(strict) vs 573K(non-strict)
Randomly Write IOPS: 143K(strict) vs 513K(non-strict)
Zhen Lei (6):
iommu/arm-smmu-v3: fix the implementation of flus
.flush_iotlb_all can not just wait for previous tlbi operations to be
completed, but should also invalid all TLBs of the related domain.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/arm-smmu
sure the 4 bytes padding is always exist.
There is no functional change.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index 5059d09..a07bc0d 100644
--- a/drivers/iommu/arm-smm
s good to explicitly add a workaround. Let's enclose the "sync_count"
into a union and companion with a new member "padding" of type u64.
There is no functional change.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 18 +-
1 file changed, 17
s good to explicitly add a workaround:
1. Add gcc __attribute__((aligned(8))) to make sure that "sync_count" is
always aligned by 8 bytes.
2. Add a "int" struct member to make sure the 4 bytes padding is always
exist.
There is no functional change.
Signed-off-by: Zhen Le
This allows the default behaviour to be controlled by a kernel config
option instead of changing the command line for the kernel to include
"iommu.strict=0" on ARM64 where this is desired.
This is similar to CONFIG_IOMMU_DEFAULT_PASSTHROUGH.
Signed-off-by: Zhen Lei
---
arch/s390/pci
amd_iommu and s390_iommu use lazy mode as
default, so there is no need to add code for them.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 14 ++
drivers/iommu/iommu.c | 5 +
2 files changed, 19 insertions(+)
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 6f07f
("iommu/arm-smmu-v3: Abort all transactions ...")
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 72 -
1 file changed, 51 insertions(+), 21 deletions(-)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index 207
No functional change, just prepare for the next patch.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 44 ++--
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index
The (STRTAB_L1_DESC_DWORDS << 3) appears more than 1 times, replace it
with STRTAB_L1_DESC_SIZE to eliminate the duplication. And the latter
seems more clear when it's used to calculate memory size. And the same is
true for STRTAB_STE_DWORDS and CTXDESC_CD_DWORDS.
Signed-off-by: Zh
if we detected the STE.config=0b000 take no effect.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 100
1 file changed, 100 insertions(+)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index 84adecc..4e95710 100644
in
the
secondary kernel to use the memory maps which it used in the first kernel.
For more
details, see patch 5.
Zhen Lei (5):
iommu/arm-smmu-v3: make sure the stale caching of L1STD are invalid
iommu/arm-smmu-v3: make smmu can be enabled in kdump kernel
iommu/arm-smmu-v3: add macro
Invalidate the caching of the intermediate L1ST descriptor after it has
been updated.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index
ixes: commit b63b3439b856 ("iommu/arm-smmu-v3: Abort all transactions ...")
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 72 -
1 file changed, 51 insertions(+), 21 deletions(-)
diff --git a/drivers/iommu/arm-smmu-v3.c b/driver
sed in the first kernel.
For more
details, see patch 5.
Zhen Lei (2):
iommu/arm-smmu-v3: make sure the stale caching of L1STD are invalid
iommu/arm-smmu-v3: to make smmu can be enabled in the kdump kernel
drivers/iommu/arm-smmu-v3.c | 88 +
1 file
After the content of L1STD(Level 1 Stream Table Descriptor) in DDR has been
modified, should make sure the cached copies be invalidated.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 16 ++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu
amd_iommu and s390_iommu use lazy mode as
defalut, so there is no need to add code for them.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 14 ++
drivers/iommu/iommu.c | 5 +
2 files changed, 19 insertions(+)
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 6f07f
abreast of the times, I think it's better to set non-strict as
default.
Below it's our iperf performance data of 25Gb netcard:
strict mode: 18-20 Gb/s
non-strict mode: 23.5 Gb/s
Signed-off-by: Zhen Lei
---
Documentation/admin-guide/kernel-parameters.txt | 4 ++--
drivers/iommu/iommu.c
about iommu.passthrough and iommu.strict, because thay can not
be coexist. Use iommu.dma_mode to replace them will be better.
Signed-off-by: Zhen Lei
---
Documentation/admin-guide/kernel-parameters.txt | 33 -
drivers/iommu/Kconfig | 4 +--
drivers/iommu
s390_iommu=strict can be replaced with iommu.dma_mode=strict.
Signed-off-by: Zhen Lei
---
Documentation/admin-guide/kernel-parameters.txt | 7 ---
arch/s390/pci/pci_dma.c | 20 +---
drivers/iommu/Kconfig | 1 +
3 files
Add IOMMU_DMA_MODE_IS_LAZY() and IOMMU_DMA_MODE_IS_PASSTHROUGH() to make
the code looks cleaner.
There is no functional change, just prepare for the following patches.
Signed-off-by: Zhen Lei
---
drivers/iommu/iommu.c | 12
include/linux/iommu.h | 11 +++
2 files changed
or
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
First, add build option IOMMU_DMA_MODE_LAZY, so that we have the
opportunity to set lazy mode as default at build time. Then put the
three config options in an choice, make people can only choose one of the
three at a time, the same to the boot options iommu.dma_mode.
Signed-off-by: Zhen Lei
iommu=nobypass can be replaced with iommu.dma_mode=strict.
Signed-off-by: Zhen Lei
---
Documentation/admin-guide/kernel-parameters.txt | 2 --
arch/powerpc/platforms/powernv/pci-ioda.c | 23 +--
drivers/iommu/Kconfig | 1 +
3 files changed
be assigned
in quirk_calpella_no_shadow_gtt().
Signed-off-by: Zhen Lei
---
arch/ia64/include/asm/iommu.h | 2 --
arch/ia64/kernel/pci-dma.c | 2 --
arch/x86/include/asm/iommu.h| 1 -
arch/x86/kernel/pci-dma.c | 20
drivers/iommu/Kconfig | 14
.
Signed-off-by: Zhen Lei
---
arch/ia64/kernel/pci-dma.c| 2 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 3 ++-
arch/s390/pci/pci_dma.c | 2 +-
arch/x86/kernel/pci-dma.c | 7 ++---
drivers/iommu/Kconfig | 44
use iommu.passthrough=1/0,
X86 use iommu=pt/nopt, PPC/POWERNV use iommu=nobypass.
Zhen Lei (1):
iommu: enhance IOMMU dma mode build options
arch/ia64/kernel/pci-dma.c| 2 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 3 ++-
arch/s390/pci/pci_dma.c | 2 +-
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 (7):
The default DMA mode is PASSTHROUGH on powernv, this patch make it can be
set to STRICT at build time. It can be overridden by boot option.
There is no functional change.
Signed-off-by: Zhen Lei
---
arch/powerpc/platforms/powernv/pci-ioda.c | 3 ++-
drivers/iommu/Kconfig
This patch removes the ifdefs around CONFIG_IOMMU_DEFAULT_PASSTHROUGH to
improve readablity.
Signed-off-by: Zhen Lei
---
arch/x86/kernel/pci-dma.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index
The default DMA mode of AMD IOMMU is LAZY, this patch make it can be set
to STRICT at build time. It can be overridden by boot option.
There is no functional change.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 2 +-
drivers/iommu/amd_iommu_init.c | 3 ++-
2 files changed, 3
The default DMA mode is LAZY on s390, this patch make it can be set to
STRICT at build time. It can be overridden by boot option.
There is no functional change.
Signed-off-by: Zhen Lei
---
arch/s390/pci/pci_dma.c | 2 +-
drivers/iommu/Kconfig | 2 ++
2 files changed, 3 insertions(+), 1
First, add build option IOMMU_DEFAULT_{LAZY|STRICT}, so that we have the
opportunity to set {lazy|strict} mode as default at build time. Then put
the three config options in an choice, make people can only choose one of
the three at a time.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 42
The default DMA mode of INTEL IOMMU is LAZY, this patch make it can be
set to STRICT at build time. It can be overridden by boot option.
There is no functional change.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 2 +-
drivers/iommu/intel-iommu.c | 2 +-
2 files changed, 2
The DMA mode PASSTHROUGH is not used on ia64.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index f6c030433d38048..f7400e35628dce4 100644
--- a/drivers/iommu/Kconfig
+++ b
The default DMA mode is LAZY on s390, this patch make it can be set to
STRICT at build time. It can be overridden by boot option.
There is no functional change.
Signed-off-by: Zhen Lei
Acked-by: Sebastian Ott
---
arch/s390/pci/pci_dma.c | 2 +-
drivers/iommu/Kconfig | 2 ++
2 files changed
The default DMA mode of INTEL IOMMU is LAZY, this patch make it can be
set to STRICT at build time. It can be overridden by boot option.
There is no functional change.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 2 +-
drivers/iommu/intel-iommu.c | 2 +-
2 files changed, 2
The DMA mode PASSTHROUGH is not used on ia64.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 70741fd73b07785..63506f1cad3d149 100644
--- a/drivers/iommu/Kconfig
+++ b
The default DMA mode is PASSTHROUGH on powernv, this patch make it can be
set to STRICT at build time. It can be overridden by boot option.
There is no functional change.
Signed-off-by: Zhen Lei
---
arch/powerpc/platforms/powernv/pci-ioda.c | 3 ++-
drivers/iommu/Kconfig
First, add build option IOMMU_DEFAULT_{LAZY|STRICT}, so that we have the
opportunity to set {lazy|strict} mode as default at build time. Then put
the three config options in an choice, make people can only choose one of
the three at a time.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 44
ed, 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/PO
Remove the ifdefs around CONFIG_IOMMU_DEFAULT_PASSTHROUGH to improve
readablity.
Signed-off-by: Zhen Lei
---
arch/x86/kernel/pci-dma.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index dcd272dbd0a9330
The default DMA mode of AMD IOMMU is LAZY, this patch make it can be set
to STRICT at build time. It can be overridden by boot option.
There is no functional change.
Signed-off-by: Zhen Lei
---
drivers/iommu/Kconfig | 2 +-
drivers/iommu/amd_iommu_init.c | 2 +-
2 files changed, 2
, to enable/disable "passthrough", ARM64 use iommu.passthrough=1/0,
X86 use iommu=pt/nopt, PPC/POWERNV use iommu=nobypass.
Zhen Lei (1):
iommu: enhance IOMMU dma mode build options
arch/ia64/kernel/pci-dma.c| 2 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 3
.
Signed-off-by: Zhen Lei
---
arch/ia64/kernel/pci-dma.c| 2 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 3 ++-
arch/s390/pci/pci_dma.c | 2 +-
arch/x86/kernel/pci-dma.c | 7 ++---
drivers/iommu/Kconfig | 44
ERNV 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
Also add IOMMU_DMA_MODE_IS_{STRICT|LAZT|PASSTHROUGH}() to make the code
looks cleaner.
There is no functional change, just prepare for the following patches.
Signed-off-by: Zhen Lei
---
drivers/iommu/iommu.c | 18 ++
include/linux/iommu.h | 18 ++
2 files
-by: Zhen Lei
---
Documentation/admin-guide/kernel-parameters.txt | 6 ++--
drivers/iommu/Kconfig | 43 +
drivers/iommu/iommu.c | 4 ++-
3 files changed, 42 insertions(+), 11 deletions(-)
diff --git a/Documentation/admin
are confused, such as: iommu.passthrough and iommu.strict,
because they are no good to be coexist. So add iommu.dma_mode.
Signed-off-by: Zhen Lei
---
Documentation/admin-guide/kernel-parameters.txt | 19
drivers/iommu/iommu.c | 59
iommu=nobypass can be replaced with iommu.dma_mode=strict.
Signed-off-by: Zhen Lei
---
Documentation/admin-guide/kernel-parameters.txt | 2 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 5 ++---
drivers/iommu/Kconfig | 1 +
3 files changed, 4 insertions(+), 4
The following equivalence or replacement relationship exists:
iommu=pt <--> iommu.dma_mode=passthrough.
iommu=nopt can be replaced with iommu.dma_mode=lazy.
intel_iommu=strict <--> iommu.dma_mode=strict.
amd_iommu=fullflush <--> iommu.dma_mode=strict.
Signed-off-by: Zhen Lei
s390_iommu=strict is equivalent to iommu.dma_mode=strict.
Signed-off-by: Zhen Lei
---
Documentation/admin-guide/kernel-parameters.txt | 6 +++---
arch/s390/pci/pci_dma.c | 14 +++---
drivers/iommu/Kconfig | 1 +
3 files changed, 11
iova_magazine_free_pfns() can only free the whole magazine buffer, add
iova_magazine_compact_pfns() to support free part of it.
Signed-off-by: Zhen Lei
---
drivers/iommu/iova.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/iommu/iova.c b/drivers
bs: 21 (f=21): [100.0% done] [10324M/0K /s] [2520K/0 iops]
Jobs: 21 (f=21): [100.0% done] [10290M/0K /s] [2512K/0 iops]
Jobs: 21 (f=21): [100.0% done] [10035M/0K /s] [2450K/0 iops]
Jobs: 21 (f=21): [100.0% done] [10214M/0K /s] [2494K/0 iops]
Signed-off-by: Zhen Lei
---
drivers/iommu
hen the 2 4K IOVAs
are
continuous freed, the first 1 IOVAs can be quickly buffered, but the
other
1 IOVAs can not.
Zhen Lei (2):
iommu/iova: introduce iova_magazine_compact_pfns()
iommu/iova: enhance the rcache optimization
drivers/iommu
v1 --> v2:
1. change the type of nr_ats_masters from atomic_t to int, and move its
ind/dec operation from arm_smmu_enable_ats()/arm_smmu_disable_ats() to
arm_smmu_attach_dev()/arm_smmu_detach_dev(), and protected by
"spin_lock_irqsave(_domain->devices_lock, flags);"
Zhen
mmu/arm-smmu-v3: Add support for PCI ATS")
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index 29056d9bb12aa01..154334d3310c9b8 100644
--- a/dr
Once a master has been added into smmu_domain->devices, it may immediately
be scaned in arm_smmu_unmap()-->arm_smmu_atc_inv_domain(). From a logical
point of view, the master should be added into smmu_domain after it has
been completely initialized.
Signed-off-by: Zhen Lei
---
drivers/iom
ave(_domain->devices_lock, flags);"
Zhen Lei (2):
iommu/arm-smmu-v3: don't add a master into smmu_domain before it's
ready
iommu/arm-smmu-v3: change the lock type of
arm_smmu_domain.devices_lock
drivers/iommu/arm-smmu-v3.c | 20 ++--
1 file changed, 10 insertio
Once a master has been added into smmu_domain->devices, it may immediately
be scaned in arm_smmu_unmap()-->arm_smmu_atc_inv_domain(). From a logical
point of view, the master should be added into smmu_domain after it has
completely initialized.
Signed-off-by: Zhen Lei
---
drivers/iommu/ar
% done] [10817M/0K /s] [2641K/0 iops] [09h:59m:12s]
Jobs: 24 (f=24): [0.2% done] [11083M/0K /s] [2706K/0 iops] [09h:59m:11s]
Jobs: 24 (f=24): [0.2% done] [10603M/0K /s] [2589K/0 iops] [09h:59m:10s]
Signed-off-by: Zhen Lei
Suggested-by: Will Deacon
---
drivers/iommu/arm-smmu-v3.
rm-smmu-v3: Add support for PCI ATS")
Signed-off-by: Zhen Lei
---
drivers/iommu/arm-smmu-v3.c | 10 --
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
index a9a9fabd396804a..1b370d9aca95f94 100644
--- a/drivers
iova_magazine_free_pfns() can only free the whole magazine buffer, add
iova_magazine_compact_pfns() to support free part of it.
Signed-off-by: Zhen Lei
---
drivers/iommu/iova.c | 17 -
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/iommu/iova.c b/drivers
bs: 21 (f=21): [100.0% done] [10324M/0K /s] [2520K/0 iops]
Jobs: 21 (f=21): [100.0% done] [10290M/0K /s] [2512K/0 iops]
Jobs: 21 (f=21): [100.0% done] [10035M/0K /s] [2450K/0 iops]
Jobs: 21 (f=21): [100.0% done] [10214M/0K /s] [2494K/0 iops]
Signed-off-by: Zhen Lei
---
drivers/iommu
the memory; If the address in the large block is not
accessed before page table switching, the TLB has no cache. After the
page table is switched, a new access is initiated to read the small block
or page mapping from the memory.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
No functional change.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index bca458c00e48a8b
hat it can work properly.
Zhen Lei (2):
perf/smmuv3: Don't reserve the register space that overlaps with the
SMMUv3
Revert "iommu/arm-smmu-v3: Don't reserve implementation defined
register space"
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 32 +++---
drivers/i
not reserve the corresponding resource again. Otherwise, a resource
reservation conflict is reported during boot.
Signed-off-by: Zhen Lei
---
drivers/perf/arm_smmuv3_pmu.c | 42 --
1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/drivers/perf
This reverts commit 52f3fab0067d6fa9e99c1b7f63265dd48ca76046.
This problem has been fixed by another patch. The original method had side
effects, it was not mapped to the user-specified resource size. The code
will become more complex when ECMDQ is supported later.
Signed-off-by: Zhen Lei
MCG register resources are located in
the 64KB Page0 of the SMMU, the PMCG driver does not reserve the conflict
resources
when the SMMUv3 driver has reserved the conflict resources before. Instead, the
PMCG
driver only performs devm_ioremap() to ensure that it can work properly.
Zhen Lei (1):
perf
register space. When both the SMMU and PMCG drivers reserve
their own resources, a resource conflict occurs.
To avoid this conflict, don't reserve the PMCG regions.
Suggested-by: Robin Murphy
Signed-off-by: Zhen Lei
Reviewed-by: Robin Murphy
---
drivers/perf/arm_smmuv3_pmu.c | 25
The MODULE_SOFTDEP() gives user space a hint of the loading sequence. And
when command "modprobe arm_smmuv3_pmu" is executed, the arm_smmu_v3.ko is
automatically loaded in advance.
Signed-off-by: Zhen Lei
---
drivers/perf/arm_smmuv3_pmu.c | 1 +
1 file changed, 1 insertion(+)
register space. When both the SMMU and PMCG drivers reserve
their own resources, a resource conflict occurs.
To avoid this conflict, don't reserve the PMCG regions.
Suggested-by: Robin Murphy
Signed-off-by: Zhen Lei
---
drivers/perf/arm_smmuv3_pmu.c | 27 +--
1 file
G driver does not reserve the conflict
resources
when the SMMUv3 driver has reserved the conflict resources before. Instead, the
PMCG
driver only performs devm_ioremap() to ensure that it can work properly.
Zhen Lei (3):
perf/smmuv3: Don't reserve the PMCG register spaces
perf/smmuv3: Add a M
SMMU_IDR6.CMDQ_CONTROL_PAGE_LOG2NUMQ. Processing its resource reservation
to avoid resource conflict with PMCG is a bit more complicated.
Therefore, the resources of the PMCG are not reserved, and the entire SMMU
resources are reserved.
Suggested-by: Robin Murphy
Signed-off-by: Zhen Lei
---
drivers/iom
e SMMUv3 driver has reserved the conflict resources before. Instead, the
PMCG
driver only performs devm_ioremap() to ensure that it can work properly.
Zhen Lei (2):
perf/smmuv3: Don't reserve the PMCG register spaces
iommu/arm-smmu-v3: Reserving the entire SMMU register space
drivers/iommu/arm/arm-
register space. When both the SMMU and PMCG drivers reserve
their own resources, a resource conflict occurs.
To avoid this conflict, don't reserve the PMCG regions.
Suggested-by: Robin Murphy
Signed-off-by: Zhen Lei
---
drivers/perf/arm_smmuv3_pmu.c | 25 +++--
1 file changed
SMMU_IDR6.CMDQ_CONTROL_PAGE_LOG2NUMQ. Processing its resource reservation
to avoid resource conflict with PMCG is a bit more complicated.
Therefore, the resources of the PMCG are not reserved, and the entire SMMU
resources are reserved.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu
.
fio bs=4k rw=read iodepth=128 cpus_allowed=0-127
Fixes: 4e89dce72521 ("iommu/iova: Retry from last rb tree node if iova search
fails")
Tested-by: Xiang Chen
Signed-off-by: Zhen Lei
---
drivers/iommu/iova.c | 23 ++-
1 file changed, 6 insertions(+), 17 deletion
Fix some spelling mistakes in comments found by "codespell":
detroyed ==> destroyed
defered ==> deferred
entrie ==> entry
alloced ==> allocated
regularily ==> regularly
Signed-off-by: Zhen Lei
---
drivers/iommu/iova.c | 2 +-
include/linux/iova.h | 10 +-
2 fi
ally by John Garry and Will Deacon:
appropriatley ==> appropriately
Additionally, The ==> Additionally, the
Signed-off-by: Zhen Lei
---
drivers/iommu/amd/amd_iommu_types.h | 2 +-
drivers/iommu/amd/init.c | 2 +-
drivers/iommu/amd/iommu.c | 2 +-
drivers/iommu/
ommu*.h
include/linux/iova.h
include/uapi/linux/iommu.h
4) Changes to files "iova.h" and "iova.c" are grouped into a new patch.
v1 --> v2:
1. Merge into one patch
2. Add a new fix "appropriatley --> appropriately" in iommu.c, discovered by
John Garry
Zhen Lei (2):
Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers
Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
Signed-off-by: Zhen Lei
---
drivers/iommu/ipmmu-vmsa.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/iommu/ipmmu-vmsa.c b
Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
Signed-off-by: Zhen Lei
---
drivers/iommu/arm/arm-smmu/arm-smmu.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/arm
Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message
Remove it can help us save a bit of memory.
Signed-off-by: Zhen Lei
---
drivers/iommu/intel/dmar.c | 2 --
drivers/iommu/intel/iommu.c | 6 +-
2 files changed, 1 insertion(+), 7 deletions(-)
diff
Run the following command to find and remove the trailing spaces and tabs:
find kernel/dma/ -type f | xargs sed -r -i 's/[ \t]+$//'
Signed-off-by: Zhen Lei
---
kernel/dma/coherent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/dma/coherent.c b/kernel/dma
All spelling mistakes are in the comments, no functional change.
Signed-off-by: Zhen Lei
---
drivers/iommu/amd/amd_iommu_types.h | 2 +-
drivers/iommu/amd/init.c | 2 +-
drivers/iommu/amd/iommu.c | 2 +-
drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +-
drivers/iommu
v1 --> v2:
1. Merge into one patch
2. Add a new fix "appropriatley --> appropriately" in iommu.c, discovered by
John Garry
Zhen Lei (1):
iommu: Clear a lot of spelling mistakes
drivers/iommu/amd/amd_iommu_types.h | 2 +-
drivers/iommu/amd/init.c | 2 +-
d
Function iommu_group_store_type() is the only caller of the static
function iommu_change_dev_def_domain() and has performed
"if (WARN_ON(!group))" detection before calling it. So the one here is
redundant.
Signed-off-by: Zhen Lei
---
drivers/iommu/iommu.c | 3 ---
1 file changed, 3
MMU driver
is the consumer. Instead, memory resources are wasted. Therefore, the
queue size of evtq and priq is restored to the original setting, one page.
Fixes: d25f6ead162e ("iommu/arm-smmu-v3: Increase maximum size of queues")
Signed-off-by: Zhen Lei
---
drivers/iommu/arm/arm-smmu-
ithout competition with other
cores to replace arm_smmu_cmdq_issue_cmdlist() when a core can have an ECMDQ.
I'm guessing it might get better performance results. Because the EMU is too
slow, it will take a while before the relevant data is available.
Zhen Lei (8):
iommu/arm-smmu-v3: Use command
101 - 200 of 239 matches
Mail list logo