diff options
author | Quentin Perret <qperret@google.com> | 2021-08-09 18:24:29 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-08-11 13:39:35 +0300 |
commit | 8e049e0daf23aa380c264e5e15e4c64ea5497ed7 (patch) | |
tree | 1461d1055e74ed77763c26b5ce3a1afb264febcd /arch/arm64/kvm/Kconfig | |
parent | d21292f13f1f0721d60e8122e2db46bea8cf6950 (diff) | |
download | linux-8e049e0daf23aa380c264e5e15e4c64ea5497ed7.tar.xz |
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
Diffstat (limited to 'arch/arm64/kvm/Kconfig')
-rw-r--r-- | arch/arm64/kvm/Kconfig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig index a4eba0908bfa..9b9721895e5c 100644 --- a/arch/arm64/kvm/Kconfig +++ b/arch/arm64/kvm/Kconfig @@ -46,6 +46,15 @@ if KVM source "virt/kvm/Kconfig" +config NVHE_EL2_DEBUG + bool "Debug mode for non-VHE EL2 object" + help + Say Y here to enable the debug mode for the non-VHE KVM EL2 object. + Failure reports will BUG() in the hypervisor. This is intended for + local EL2 hypervisor development. + + If unsure, say N. + endif # KVM endif # VIRTUALIZATION |