diff options
author | Jintack Lim <jintack.lim@linaro.org> | 2023-02-09 17:58:14 +0000 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2023-02-11 10:08:39 +0000 |
commit | bd36b1a9eb5a2842e1c44d8d8e7ff9b07cff7ed8 (patch) | |
tree | 115d93d346a5e487ac0d76910a0d55325ce7f338 /usr | |
parent | 6898a55ce38c13e47a0647380504d309e9b0f631 (diff) | |
download | lwn-bd36b1a9eb5a2842e1c44d8d8e7ff9b07cff7ed8.tar.gz lwn-bd36b1a9eb5a2842e1c44d8d8e7ff9b07cff7ed8.zip |
KVM: arm64: nv: Handle SMCs taken from virtual EL2
Non-nested guests have used the hvc instruction to initiate SMCCC
calls into KVM. This is quite a poor fit for NV as hvc exceptions are
always taken to EL2. In other words, KVM needs to unconditionally
forward the hvc exception back into vEL2 to uphold the architecture.
Instead, treat the smc instruction from vEL2 as we would a guest
hypercall, thereby allowing the vEL2 to interact with KVM's hypercall
surface. Note that on NV-capable hardware HCR_EL2.TSC causes smc
instructions executed in non-secure EL1 to trap to EL2, even if EL3 is
not implemented.
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Jintack Lim <jintack.lim@linaro.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230209175820.1939006-13-maz@kernel.org
[Oliver: redo commit message, only handle smc from vEL2]
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions