]> git.baikalelectronics.ru Git - 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)
commit6aa42c9bbdee5df14fc41f1b95997baa9f0e50bb
tree16a1070795b753152fff3b97c20f7bdc18123a0c
parente726588ad5cbf8449ff97af7c6ce253338fff4cc
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