All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] KVM: arm64: Skip RCU protection for hyp stage-1
@ 2022-11-14 20:11 ` Oliver Upton
  0 siblings, 0 replies; 12+ messages in thread
From: Oliver Upton @ 2022-11-14 20:11 UTC (permalink / raw)
  To: Marc Zyngier, James Morse, Alexandru Elisei
  Cc: linux-arm-kernel, kvmarm, kvm, kvmarm, Oliver Upton, Marek Szyprowski

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 <m.szyprowski@samsung.com>

[1]: https://lore.kernel.org/kvmarm/d9854277-0411-8169-9e8b-68d15e4c0248@samsung.com/
[2]: https://lore.kernel.org/linux-arm-kernel/20221110190259.26861-1-will@kernel.org/

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(-)

-- 
2.38.1.431.g37b22c650d-goog


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-11-15 17:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-14 20:11 [PATCH 0/1] KVM: arm64: Skip RCU protection for hyp stage-1 Oliver Upton
2022-11-14 20:11 ` Oliver Upton
2022-11-14 20:11 ` Oliver Upton
2022-11-14 20:11 ` [PATCH 1/1] KVM: arm64: Use a separate function for hyp stage-1 walks Oliver Upton
2022-11-14 20:11   ` Oliver Upton
2022-11-14 20:11   ` Oliver Upton
2022-11-15 13:25   ` Will Deacon
2022-11-15 13:25     ` Will Deacon
2022-11-15 13:25     ` Will Deacon
2022-11-15 17:23     ` Oliver Upton
2022-11-15 17:23       ` Oliver Upton
2022-11-15 17:23       ` Oliver Upton

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.