summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/image-vars.h
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2021-03-22 15:09:51 +0300
committerMarc Zyngier <maz@kernel.org>2021-03-25 14:00:33 +0300
commit755db23420a1ce4b740186543432983e9bbe713e (patch)
treeae61e46ebac9d8b0857e4a91aca47128b99076f5 /arch/arm64/kernel/image-vars.h
parent90134ac9cabb69972d0a509bf08e108a73442184 (diff)
downloadlinux-755db23420a1ce4b740186543432983e9bbe713e.tar.xz
KVM: arm64: Generate final CTR_EL0 value when running in Protected mode
In protected mode, late CPUs are not allowed to boot (enforced by the PSCI relay). We can thus specialise the read_ctr macro to always return a pre-computed, sanitised value. Special care is taken to prevent the use of this custome version outside of the protected mode. Reviewed-by: Quentin Perret <qperret@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/image-vars.h')
-rw-r--r--arch/arm64/kernel/image-vars.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm64/kernel/image-vars.h b/arch/arm64/kernel/image-vars.h
index d5dc2b792651..fdd60cd1d7e8 100644
--- a/arch/arm64/kernel/image-vars.h
+++ b/arch/arm64/kernel/image-vars.h
@@ -65,6 +65,7 @@ __efistub__ctype = _ctype;
KVM_NVHE_ALIAS(kvm_patch_vector_branch);
KVM_NVHE_ALIAS(kvm_update_va_mask);
KVM_NVHE_ALIAS(kvm_get_kimage_voffset);
+KVM_NVHE_ALIAS(kvm_compute_final_ctr_el0);
/* Global kernel state accessed by nVHE hyp code. */
KVM_NVHE_ALIAS(kvm_vgic_global_state);