]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
KVM: arm64: Safety check PSTATE when entering guest and handle IL
authorChristoffer Dall <christoffer.dall@arm.com>
Wed, 17 Oct 2018 18:21:16 +0000 (20:21 +0200)
committerMarc Zyngier <marc.zyngier@arm.com>
Fri, 19 Oct 2018 10:13:03 +0000 (11:13 +0100)
commite4e11cc0f81ee7be17d6f6fb96128a6d51c0e838
tree16a1070795b753152fff3b97c20f7bdc18123a0c
parent58bf437ff64eac8aca606e42d7e4623e40b61fa1
KVM: arm64: Safety check PSTATE when entering guest and handle IL

This commit adds a paranoid check when entering the guest to make sure
we don't attempt running guest code in an equally or more privilged mode
than the hypervisor.  We also catch other accidental programming of the
SPSR_EL2 which results in an illegal exception return and report this
safely back to the user.

Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/kvm_asm.h
arch/arm64/include/asm/ptrace.h
arch/arm64/kvm/handle_exit.c
arch/arm64/kvm/hyp/hyp-entry.S
arch/arm64/kvm/hyp/sysreg-sr.c