[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data
From: |
Richard Henderson |
Subject: |
Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data |
Date: |
Fri, 27 Sep 2019 09:02:00 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 9/27/19 3:30 AM, David Hildenbrand wrote:
>> + /* Update ILEN, except for breakpoint, where we didn't load an insn. */
>> + if (ilen) {
>> + env->int_pgm_ilen = ilen;
>> + }
>
> I am not completely sure about breakpoint handling and which
> implications we'll have when not setting int_pgm_ilen ...
Yeah. Possibly to make it simple I should simply assign 2 as the length of a
breakpoint, bearing in mind that there is no a s390 exception to be delivered
-- this is purely a qemu-internal thing, raising EXCP_DEBUG to get back to the
gdbstub interface.
> I wonder if that change can help to better handle exceptions during
> EXECUTE, whereby we have to indicate the EXECUTE instruction and the
> ilen of the EXECUTE instruction (so the pc and ilen of the original
> EXECUTE function, not of the EXECUTE target).
Yes, that's already there. The ilen of the execute insn is placed in the low 4
bits of env->ex_value, and that's what we record as ilen within extract_insn().
> I don't completely like the current interrupt handling when we have
> "env->ex_value" in "s390_cpu_exec_interrupt()". I'd love to see that
> check go, then we can reuse that function easily e.g., in MVC to test
> and inject exceptions while processing such an interruptible instruction
> - like MVC.
I don't think that reusing s390_cpu_exec_interrupt directly is a good idea.
There's other cleanup that needs to happen when exiting a TB.
What I think you should do instead is check env_neg(env)->icount_decr, exactly
like we do at the start of every basic block, and use that as an indication
that you should exit back to the main loop.
r~
- [PATCH v3 00/18] target/s390: Use tcg unwinding for ilen, Richard Henderson, 2019/09/26
- [PATCH v3 02/18] target/s390x: Add ilen to unwind data, Richard Henderson, 2019/09/26
- Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data, David Hildenbrand, 2019/09/27
- Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data,
Richard Henderson <=
- Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data, David Hildenbrand, 2019/09/30
- Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data, Richard Henderson, 2019/09/30
- Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data, David Hildenbrand, 2019/09/30
- Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data, Richard Henderson, 2019/09/30
- Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data, David Hildenbrand, 2019/09/30
[PATCH v3 01/18] target/s390x: Truncate 32-bit psw_addr before creating TB, Richard Henderson, 2019/09/26
[PATCH v3 07/18] target/s390x: Handle tec in s390_cpu_tlb_fill, Richard Henderson, 2019/09/26