kvm: arm64: handle single-step during SError exceptions
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 23 Nov 2017 12:11:33 +0000 (12:11 +0000)
committerChristoffer Dall <christoffer.dall@linaro.org>
Wed, 29 Nov 2017 17:17:46 +0000 (18:17 +0100)
commite70dce73befcf96607bc6e24c2c8f84229d6721e
treec6ac26fab0be1d38180417827a6a23276b3ca1cd
parent1eb591288b956bdd75e464e69b6b8207ffa6e5e3
kvm: arm64: handle single-step during SError exceptions

When an SError arrives during single-step both the SError and debug
exceptions may be pending when the step is completed, and the
architecture doesn't define the ordering of the two.  This means that we
can observe en SError even though we've just completed a step, without
receiving a debug exception.  In that case the DBG_SPSR_SS bit will have
flipped as the instruction executed. After handling the abort in
handle_exit() we test to see if the bit is clear and we were
single-stepping before deciding if we need to exit to user space.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
arch/arm64/kvm/handle_exit.c