KVM: arm64: nv: Handle trapped ERET from virtual EL2
authorChristoffer Dall <christoffer.dall@arm.com>
Thu, 9 Feb 2023 17:58:13 +0000 (17:58 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Sat, 11 Feb 2023 09:16:11 +0000 (09:16 +0000)
commit6898a55ce38c13e47a0647380504d309e9b0f631
treeeb99e828dfce9ce83137ab8a7d448e68792c5c0a
parent93c33702cd2beb0cb49a857afdbf231c92eb9df5
KVM: arm64: nv: Handle trapped ERET from virtual EL2

When a guest hypervisor running virtual EL2 in EL1 executes an ERET
instruction, we will have set HCR_EL2.NV which traps ERET to EL2, so
that we can emulate the exception return in software.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Alexandru Elisei <alexandru.elisei@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230209175820.1939006-12-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/esr.h
arch/arm64/include/asm/kvm_arm.h
arch/arm64/kvm/handle_exit.c