Skip to content

KVM: arm64: Limit stage2_apply_range() batch size to largest block

Oliver Upton kvm kvmarm linux-arm-kernel 3 versions – Applied

Status from this message: Applied to fixes, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyApplied
  2. v21 patch 3 repliesSuperseded
  3. v11 patch 2 repliesSuperseded

Changes in v3 from the cover letter

- Just use the largest block size as the batch size (Marc)

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: arm64: Work out supported block level at compile timearch/arm64/include/asm/kvm_pgtable.h+13 -50 replies
2/2KVM: arm64: Limit stage2_apply_range() batch size to largest blockarch/arm64/include/asm/stage2_pgtable.h arch/arm64/kvm/mmu.c+8 -210 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/2] KVM: arm64: Limit stage2_apply_range() batch size to largest block

Continuing with MMU patches to post, a small series fixing some soft lockups caused by stage2_apply_range(). Depending on the paging setup, we could walk a very large amount of memory before dropping the lock and rescheduling.

Applies to kvmarm-6.1. Tested with KVM selftests and kvm-unit-tests with all supported page sizes (4K, 16K, 64K). Additionally, I no longer saw soft lockups with the following:

./dirty_log_perf_test -m -2 -s anonymous_thp -b 4G -v 48

v2: https://lore.kernel.org/kvmarm/[email protected]/

v2 -> v3:
- Just use the largest block size as the batch size (Marc)

Oliver Upton (2):
KVM: arm64: Work out supported block level at compile time
KVM: arm64: Limit stage2_apply_range() batch size to largest block

 arch/arm64/include/asm/kvm_pgtable.h    | 18 +++++++++++++-----
 arch/arm64/include/asm/stage2_pgtable.h | 20 --------------------
 arch/arm64/kvm/mmu.c                    |  9 ++++++++-
 3 files changed, 21 insertions(+), 26 deletions(-)

base-commit: b302ca52ba8235ff0e18c0fa1fa92b51784aef6a

Signature · 1 line
2.38.0.rc1.362.ged0d419d3c-goog