KVM: arm64: Introduce and use predicates that check for protected VMs
authorFuad Tabba <tabba@google.com>
Tue, 23 Apr 2024 15:05:26 +0000 (16:05 +0100)
committerMarc Zyngier <maz@kernel.org>
Wed, 1 May 2024 15:48:14 +0000 (16:48 +0100)
commitb6ed4fa9411f7c17ebc69949c1df66dc12b2f827
treebbc40a05211579a7a3fbda9888ca61761ad716d9
parentd81a91af417c8f34dc3c3f8f90240e843d1c5c08
KVM: arm64: Introduce and use predicates that check for protected VMs

In order to determine whether or not a VM or vcpu are protected,
introduce helpers to query this state. While at it, use the vcpu
helper to check vcpus protected state instead of the kvm one.

Co-authored-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Fuad Tabba <tabba@google.com>
Acked-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240423150538.2103045-19-tabba@google.com
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/hyp/include/nvhe/pkvm.h
arch/arm64/kvm/hyp/nvhe/switch.c