KVM: arm64: nv: Support virtual EL2 exceptions
authorJintack Lim <jintack.lim@linaro.org>
Thu, 9 Feb 2023 17:58:11 +0000 (17:58 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Sat, 11 Feb 2023 09:16:11 +0000 (09:16 +0000)
commit47f3a2fc765ae2719e6daf39c0a1c757934b152e
treee5a7fb018dbe85c2cfd8c14f1c5a9620db257310
parent6ff9dc238a53f4554d97b561fe4e8467d86544d9
KVM: arm64: nv: Support virtual EL2 exceptions

Support injecting exceptions and performing exception returns to and
from virtual EL2.  This must be done entirely in software except when
taking an exception from vEL0 to vEL2 when the virtual HCR_EL2.{E2H,TGE}
== {1,1}  (a VHE guest hypervisor).

[maz: switch to common exception injection framework, illegal exeption
 return handling]

Reviewed-by: Ganapatrao Kulkarni <gankulkarni@os.amperecomputing.com>
Signed-off-by: Jintack Lim <jintack.lim@linaro.org>
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-10-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/kvm_arm.h
arch/arm64/include/asm/kvm_emulate.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/Makefile
arch/arm64/kvm/emulate-nested.c [new file with mode: 0644]
arch/arm64/kvm/hyp/exception.c
arch/arm64/kvm/inject_fault.c
arch/arm64/kvm/trace_arm.h