]> 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)
commita13ad0e9a30d414ec26a46e7f53f9480d11606f2
tree8dd343bd2f9f13986be4dc8e06a987fff09ba6d3
parentbe5e99639e8abb892bc185b0054e819ab9cea46c
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