Skip to content

KVM: arm64: Hypervisor stack enhancements

Kalesh Singh kvmarm linux-arm-kernel lkml 8 versions – Applied

Status from this message: Applied to next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest6 patches 3 repliesApplied
  2. v76 patches 10 repliesSuperseded
  3. v68 patches 14 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v58 patches4 repliesSuperseded
v48 patches7 repliesSuperseded
v38 patches11 repliesSuperseded
v29 patches14 repliesSuperseded
v17 patches4 repliesSuperseded

Patches in v8 Applied

#Subject and filesSizeRepliesApplied
1/6KVM: arm64: Introduce hyp_alloc_private_va_range()arch/arm64/include/asm/kvm_mmu.h arch/arm64/kvm/mmu.c+44 -210 replies
2/6KVM: arm64: Introduce pkvm_alloc_private_va_range()arch/arm64/kvm/hyp/include/nvhe/mm.h arch/arm64/kvm/hyp/nvhe/hyp-main.c arch/arm64/kvm/hyp/nvhe/mm.c+72 -300 replies
3/6KVM: arm64: Add guard pages for KVM nVHE hypervisor stackarch/arm64/include/asm/kvm_asm.h arch/arm64/include/asm/kvm_mmu.h arch/arm64/kvm/arm.c +1 more+39 -50 replies
4/6KVM: arm64: Add guard pages for pKVM (protected nVHE) hypervisor stackarch/arm64/kvm/hyp/nvhe/setup.c+28 -30 replies
5/6KVM: arm64: Detect and handle hypervisor stack overflowsarch/arm64/kvm/hyp/nvhe/host.S arch/arm64/kvm/hyp/nvhe/switch.c+30 -10 replies
6/6KVM: arm64: Symbolize the nVHE HYP addressesarch/arm64/kvm/handle_exit.c scripts/kallsyms.c+7 -90 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchFuad Tabba
1/6T-b R-b
2/6T-b R-b
3/6T-b R-b
4/6T-b R-b
5/6T-b R-b
6/6T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v8 thread

Cover letter [PATCH v8 0/6] KVM: arm64: Hypervisor stack enhancements

Hi all,

This is v8 of the nVHE hypervisor stack enhancements. This version is based on 5.18-rc3.

Previous versions can be found at:
v7: https://lore.kernel.org/r/[email protected]/
v6: https://lore.kernel.org/r/[email protected]/
v5: https://lore.kernel.org/r/[email protected]/
v4: https://lore.kernel.org/r/[email protected]/
v3: https://lore.kernel.org/r/[email protected]/
v2: https://lore.kernel.org/r/[email protected]/
v1: https://lore.kernel.org/r/[email protected]/

Thanks,
Kalesh

-----

This series is based on 5.18-rc3 and adds stack guard pages to nVHE and pKVM hypervisor; and symbolization of hypervisor addresses.

The guard page stack overflow detection is based on the technique used by arm64 VMAP_STACK. i.e. the stack is aligned such that the 'stack shift' bit of any valid SP is 1. The 'stack shift' bit can be tested in the exception entry to detect overflow without corrupting GPRs.

Kalesh Singh (6):
KVM: arm64: Introduce hyp_alloc_private_va_range()
KVM: arm64: Introduce pkvm_alloc_private_va_range()
KVM: arm64: Add guard pages for KVM nVHE hypervisor stack
KVM: arm64: Add guard pages for pKVM (protected nVHE) hypervisor stack
KVM: arm64: Detect and handle hypervisor stack overflows
KVM: arm64: Symbolize the nVHE HYP addresses

 arch/arm64/include/asm/kvm_asm.h     |  1 +
 arch/arm64/include/asm/kvm_mmu.h     |  3 ++
 arch/arm64/kvm/arm.c                 | 37 +++++++++++--
 arch/arm64/kvm/handle_exit.c         | 13 ++---
 arch/arm64/kvm/hyp/include/nvhe/mm.h |  6 ++-
 arch/arm64/kvm/hyp/nvhe/host.S       | 24 +++++++++
 arch/arm64/kvm/hyp/nvhe/hyp-main.c   | 18 ++++++-
 arch/arm64/kvm/hyp/nvhe/mm.c         | 78 ++++++++++++++++++----------
 arch/arm64/kvm/hyp/nvhe/setup.c      | 31 +++++++++--
 arch/arm64/kvm/hyp/nvhe/switch.c     |  7 ++-
 arch/arm64/kvm/mmu.c                 | 68 ++++++++++++++++--------
 scripts/kallsyms.c                   |  3 +-
 12 files changed, 220 insertions(+), 69 deletions(-)

base-commit: b2d229d4ddb17db541098b83524d901257e93845

Signature · 1 line
2.36.0.rc0.470.gd361397f0d-goog