[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 01/14] target/s390x: Do not use unwind for per_check_exceptio
From: |
Ilya Leoshkevich |
Subject: |
Re: [PATCH 01/14] target/s390x: Do not use unwind for per_check_exception |
Date: |
Wed, 22 May 2024 22:46:51 +0200 |
User-agent: |
Evolution 3.50.4 (3.50.4-1.fc39) |
On Wed, 2024-05-01 at 22:44 -0700, Richard Henderson wrote:
> Using exception unwind via tcg_s390_program_interrupt,
> we discard the current value of psw.addr, which discards
> the result of a branch.
>
> Pass in the address of the next instruction, which may
> not be sequential. Pass in ilen, which we would have
> gotten from unwind and is passed to the exception handler.
> Sync cc_op before the call, which we would have gotten
> from unwind.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> target/s390x/helper.h | 2 +-
> target/s390x/tcg/excp_helper.c | 2 +-
> target/s390x/tcg/misc_helper.c | 23 ++++++++++++++++++++---
> target/s390x/tcg/translate.c | 13 +++++++------
> 4 files changed, 29 insertions(+), 11 deletions(-)
IIUC this fixes the contents of old PSW so that it matches the
following wording from PoP:
When a PER interruption is caused by branch-
ing, the PER address identifies the branch
instruction (or execute-type instruction, as appro-
priate), whereas the old PSW points to the next
instruction to be executed.
whereas currently old PSW = unwind(GETPC()) = branch instruction.
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
- [PATCH 00/14] target/s390x: Fix and improve PER, Richard Henderson, 2024/05/02
- [PATCH 04/14] target/s390x: Record separate PER bits in TB flags, Richard Henderson, 2024/05/02
- [PATCH 01/14] target/s390x: Do not use unwind for per_check_exception, Richard Henderson, 2024/05/02
- Re: [PATCH 01/14] target/s390x: Do not use unwind for per_check_exception,
Ilya Leoshkevich <=
- [PATCH 02/14] target/s390x: Move cpu_get_tb_cpu_state out of line, Richard Henderson, 2024/05/02
- [PATCH 03/14] target/s390x: Update CR9 bits, Richard Henderson, 2024/05/02
- [PATCH 05/14] target/s390x: Disable conditional branch-to-next for PER, Richard Henderson, 2024/05/02
- [PATCH 10/14] target/s390x: Raise exception from per_store_real, Richard Henderson, 2024/05/02
- [PATCH 11/14] target/s390x: Fix helper_per_ifetch flags, Richard Henderson, 2024/05/02