Commit 12f0397b authored by Will Deacon's avatar Will Deacon Committed by Will Deacon
Browse files

UPSTREAM: KVM: arm64: Reject stub hypercalls after pKVM has been initialised



The stub hypercalls provide mechanisms to reset and replace the EL2 code,
so uninstall them once pKVM has been initialised in order to ensure the
integrity of the hypervisor code.

To ensure pKVM initialisation remains functional, split cpu_hyp_reinit()
into two helper functions to separate usage of the stub from usage of
pkvm hypercalls either side of __pkvm_init on the boot CPU.

Cc: Marc Zyngier <maz@kernel.org>
Cc: Quentin Perret <qperret@google.com>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211008135839.1193-4-will@kernel.org


(cherry picked from commit 8579a185)
Bug: 204960018
Signed-off-by: default avatarWill Deacon <willdeacon@google.com>
Change-Id: I6ad3affee8119fb312be91c2e6555103d12089cd
parent 78b51c6f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment