target/arm: fix incorrect current EL bug in aarch32 exception emulation
commit88828bf133b64b7a860c166af3423ef1a47c5d3b
authorChangbin Du <changbin.du@gmail.com>
Sat, 28 Mar 2020 14:02:32 +0000 (28 22:02 +0800)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 30 Mar 2020 12:55:32 +0000 (30 13:55 +0100)
tree1cc829aeb1cf7b6170aba2d281edba81bef89166
parent660b4e70422bd19b09fa979733645ad6a55d88f2
target/arm: fix incorrect current EL bug in aarch32 exception emulation

The arm_current_el() should be invoked after mode switching. Otherwise, we
get a wrong current EL value, since current EL is also determined by
current mode.

Fixes: 4a2696c0d4 ("target/arm: Set PAN bit as required on exception entry")
Signed-off-by: Changbin Du <changbin.du@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20200328140232.17278-1-changbin.du@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/helper.c