]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Add SMC handler in nVHE EL2
authorDavid Brazdil <dbrazdil@google.com>
Wed, 2 Dec 2020 18:41:11 +0000 (18:41 +0000)
committerMarc Zyngier <maz@kernel.org>
Fri, 4 Dec 2020 10:08:34 +0000 (10:08 +0000)
commit5b4e683dbc2cf7c2e4aee94179dc44a0f0b9b9d0
tree8dd343bd2f9f13986be4dc8e06a987fff09ba6d3
parent750f94aedd810f7c45ade02e0b060b3fb7b0387d
KVM: arm64: Add SMC handler in nVHE EL2

Add handler of host SMCs in KVM nVHE trap handler. Forward all SMCs to
EL3 and propagate the result back to EL1. This is done in preparation
for validating host SMCs in KVM protected mode.

The implementation assumes that firmware uses SMCCC v1.2 or older. That
means x0-x17 can be used both for arguments and results, other GPRs are
preserved.

Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201202184122.26046-16-dbrazdil@google.com
arch/arm64/kvm/hyp/nvhe/host.S
arch/arm64/kvm/hyp/nvhe/hyp-main.c