arm: fix aa64_generate_debug_exceptions to work with EL2
commit22af90255ec2100a44cbbb7f0460ba15eed79538
authorAlex Bennée <alex.bennee@linaro.org>
Tue, 13 Nov 2018 10:47:59 +0000 (13 10:47 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 13 Nov 2018 10:47:59 +0000 (13 10:47 +0000)
treeb74ca29cb0a41c0d3b899aad83c239857ae9b344
parentb281ba4223c302c41ff8104152bfdd44de4fe798
arm: fix aa64_generate_debug_exceptions to work with EL2

The test was incomplete and incorrectly caused debug exceptions to be
generated when returning to EL2 after a failed attempt to single-step
an EL1 instruction. Fix this while cleaning up the function a little.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20181109152119.9242-8-alex.bennee@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/cpu.h