kvm: arm64: handle single-stepping trapped instructions
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 16 Nov 2017 15:39:20 +0000 (15:39 +0000)
committerChristoffer Dall <christoffer.dall@linaro.org>
Wed, 29 Nov 2017 15:46:20 +0000 (16:46 +0100)
commit7226bc2e126dfb6d81e85a75f373ea4cc3619406
tree6e5c5541754d8aca9f9d311ff8f3c753137cf048
parent696673d192f52c2c5a702224ee21f005318a844b
kvm: arm64: handle single-stepping trapped instructions

If we are using guest debug to single-step the guest, we need to ensure
that we exit after emulating the instruction. This only affects
instructions completely emulated by the kernel. For instructions
emulated in userspace, we need to exit and return to complete the
emulation.

The kvm_arm_handle_step_debug() helper sets up the necessary exit
state if needed.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Julien Thierry <julien.thierry@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm64/kvm/handle_exit.c