]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: arm64: Add {get,put}_pkvm_hyp_vm() helpers
authorQuentin Perret <qperret@google.com>
Wed, 18 Dec 2024 19:40:49 +0000 (19:40 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 20 Dec 2024 09:44:00 +0000 (09:44 +0000)
commit99996d575ee69d4327bad98a0148729b73dde23a
treee3c323792f206fde2e1a9d0ac77f840a0224e699
parentc77e5181fed54b25d489eb7d2ccb5c1c72a1063c
KVM: arm64: Add {get,put}_pkvm_hyp_vm() helpers

In preparation for accessing pkvm_hyp_vm structures at EL2 in a context
where we can't always expect a vCPU to be loaded (e.g. MMU notifiers),
introduce get/put helpers to get temporary references to hyp VMs from
any context.

Tested-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Quentin Perret <qperret@google.com>
Link: https://lore.kernel.org/r/20241218194059.3670226-9-qperret@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/hyp/include/nvhe/pkvm.h
arch/arm64/kvm/hyp/nvhe/pkvm.c