target/s390x: Move trans_exc_code update to do_program_interrupt
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 28 Jul 2023 19:53:59 +0000 (12:53 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 31 Jul 2023 19:19:13 +0000 (12:19 -0700)
commit8b94ec53f367db7adcc9b59c483ce3e6c7bc3740
tree5f9fa7340f118fde60eea07b302a4d088f417c78
parent38dd78c41eaf08b490c9e7ec68fc508bbaa5cb1d
target/s390x: Move trans_exc_code update to do_program_interrupt

This solves a problem in which the store to LowCore during tlb_fill
triggers a clean-page TB invalidation for page0 during translation,
which results in an assertion failure for locked pages.

By delaying the store until after the exception has been raised,
we will have unwound the pages locked for translation and the
problem does not arise.  There are plenty of other updates to
LowCore while delivering an interrupt/exception; trans_exc_code
does not need to be special.

Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/s390x/tcg/excp_helper.c