Skip to content

KVM: arm64: Skip RCU protection for hyp stage-1

Oliver Upton kvm kvmarm linux-arm-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1KVM: arm64: Use a separate function for hyp stage-1 walksarch/arm64/include/asm/kvm_pgtable.h arch/arm64/kvm/hyp/nvhe/setup.c arch/arm64/kvm/hyp/pgtable.c+40 -42 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/1] KVM: arm64: Skip RCU protection for hyp stage-1

Whelp, that was quick.

Marek reports [1] that the parallel faults series leads to a kernel BUG when initializing the hyp stage-1 page tables. Work around the issue by never acquiring the RCU read lock when walking hyp stage-1. This is safe because hyp stage-1 is protected by a spinlock (pKVM) or mutex (regular nVHE).

The included patch applies to the parallel faults series. To avoid breaking bisection, the patch should immediately precede commit c3119ae45dfb ("KVM: arm64: Protect stage-2 traversal with RCU"). Or, if preferred, I can respin the whole series in the correct order.

Tested with the pKVM isolated vCPU state series [2] merged on top, w/ kvm-arm.mode={nvhe,protected} on an Ampere Altra system.

Cc Marek Szyprowski <[email protected]>

[1]: https://lore.kernel.org/kvmarm/[email protected]/
[2]: https://lore.kernel.org/linux-arm-kernel/[email protected]/

Oliver Upton (1):
KVM: arm64: Use a separate function for hyp stage-1 walks

 arch/arm64/include/asm/kvm_pgtable.h | 24 ++++++++++++++++++++++++
 arch/arm64/kvm/hyp/nvhe/setup.c      |  2 +-
 arch/arm64/kvm/hyp/pgtable.c         | 18 +++++++++++++++---
 3 files changed, 40 insertions(+), 4 deletions(-)
Signature · 1 line
2.38.1.431.g37b22c650d-goog