]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Introduce hyp_assert_lock_held()
authorQuentin Perret <qperret@google.com>
Mon, 9 Aug 2021 15:24:29 +0000 (16:24 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 11 Aug 2021 10:39:35 +0000 (11:39 +0100)
commitb4ecc31e4f51cc0d66c652428a701dd2c9c4fa38
tree1461d1055e74ed77763c26b5ce3a1afb264febcd
parent9d9b31b6da6939c34f4523225abd54a4de2955f1
KVM: arm64: Introduce hyp_assert_lock_held()

Introduce a poor man's lockdep implementation at EL2 which allows to
BUG() whenever a hyp spinlock is not held when it should. Hide this
feature behind a new Kconfig option that targets the EL2 object
specifically, instead of piggy backing on the existing CONFIG_LOCKDEP.
EL2 cannot WARN() cleanly to report locking issues, hence BUG() is the
only option and it is not clear whether we want this widely enabled.
This is most likely going to be useful for local testing until the EL2
WARN() situation has improved.

Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210809152448.1810400-3-qperret@google.com
arch/arm64/kvm/Kconfig
arch/arm64/kvm/hyp/include/nvhe/spinlock.h