summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/hyp/nvhe/tlb.c
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2020-10-26 09:51:09 +0000
committerMarc Zyngier <maz@kernel.org>2020-10-29 19:49:02 +0000
commit28e81c6270b3d0e9faadd565f314ad9ac8256620 (patch)
tree0ecf256edc134a02c827573c6260bf08d2595e7e /arch/arm64/kvm/hyp/nvhe/tlb.c
parent4e5dc64c43192b4fd4c96ac150a8f013065f5f5b (diff)
KVM: arm64: Don't corrupt tpidr_el2 on failed HVC call
The hyp-init code starts by stashing a register in TPIDR_EL2 in in order to free a register. This happens no matter if the HVC call is legal or not. Although nothing wrong seems to come out of it, it feels odd to alter the EL2 state for something that eventually returns an error. Instead, use the fact that we know exactly which bits of the __kvm_hyp_init call are non-zero to perform the check with a series of EOR/ROR instructions, combined with a build-time check that the value is the one we expect. Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20201026095116.72051-2-maz@kernel.org
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/tlb.c')
0 files changed, 0 insertions, 0 deletions