KVM: arm64: nv: Inject HVC exceptions to the virtual EL2
authorJintack Lim <jintack.lim@linaro.org>
Thu, 9 Feb 2023 17:58:12 +0000 (17:58 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Sat, 11 Feb 2023 09:16:11 +0000 (09:16 +0000)
commit93c33702cd2beb0cb49a857afdbf231c92eb9df5
tree806f464e92975c38ff863be138e01841ddd3147b
parent47f3a2fc765ae2719e6daf39c0a1c757934b152e
KVM: arm64: nv: Inject HVC exceptions to the virtual EL2

As we expect all PSCI calls from the L1 hypervisor to be performed
using SMC when nested virtualization is enabled, it is clear that
all HVC instruction from the VM (including from the virtual EL2)
are supposed to handled in the virtual EL2.

Forward these to EL2 as required.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Jintack Lim <jintack.lim@linaro.org>
[maz: add handling of HCR_EL2.HCD]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230209175820.1939006-11-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/handle_exit.c