[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: |
David Hildenbrand |
Subject: |
Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data |
Date: |
Mon, 30 Sep 2019 17:42:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 30.09.19 17:03, Richard Henderson wrote:
> On 9/30/19 12:55 AM, David Hildenbrand wrote:
>>> 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.
>>
>> The issue is that when we return to the main loop we really have to
>> inject an interrupt - otherwise we might simply skip parts of the
>> (interruptible) instruction and continue with the next one.
>
> Do we? We will return to the main loop with psw.addr still pointing at MVCL,
> so the interrupt is delivered, and when the exception returns we restart the
> MVCL. Or, an interrupt is not delivered and we restart from psw.addr and
> still
> restart the MVCL.
If that's the case, then this should indeed work.
>
> We probably would have to take a hard look at EXECUTE of MVCL to see if that
> is
> actually restartable. Not that it makes particular sense to want that combo,
> but it's required to work.
>
Yes, this has to work. I'll look into that once I have some time.
>> However, with I/O interrupts, we can actually race against other VCPUs.
>> So the I/O interrupt might be gone by the time we arrive in the main loop.
>
> Of course, but it's no different with this case than any other. If the
> interrupt has already been handled, then we will simply restart the next TB as
> per normal.
Yeah, I was mostly concerned that "the next TB" will be "the next
instruction" and not "the original instruction again".
--
Thanks,
David / dhildenb
- [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, 2019/09/27
- 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 <=
- 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
[PATCH v3 08/18] target/s390: Return exception from mmu_translate_real, Richard Henderson, 2019/09/26