/* SPDX-License-Identifier: GPL-2.0-only */ /* * A stand-alone ticket spinlock implementation for use by the non-VHE * KVM hypervisor code running at EL2. * * Copyright (C) 2020 Google LLC * Author: Will Deacon <will@kernel.org> * * Heavily based on the implementation removed by c11090474d70 which was: * Copyright (C) 2012 ARM Ltd.
*/
#ifdef CONFIG_NVHE_EL2_DEBUG staticinlinevoid hyp_assert_lock_held(hyp_spinlock_t *lock)
{ /* * The __pkvm_init() path accesses protected data-structures without * holding locks as the other CPUs are guaranteed to not enter EL2 * concurrently at this point in time. The point by which EL2 is * initialized on all CPUs is reflected in the pkvm static key, so * wait until it is set before checking the lock state.
*/ if (static_branch_likely(&kvm_protected_mode_initialized))
BUG_ON(!hyp_spin_is_locked(lock));
} #else staticinlinevoid hyp_assert_lock_held(hyp_spinlock_t *lock) { } #endif
#endif/* __ARM64_KVM_NVHE_SPINLOCK_H__ */
Messung V0.5
¤ Dauer der Verarbeitung: 0.2 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.