[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 14/18] target/s390x: Rely on unwinding in s390_cpu_tlb_fil
From: |
David Hildenbrand |
Subject: |
Re: [PATCH v3 14/18] target/s390x: Rely on unwinding in s390_cpu_tlb_fill |
Date: |
Mon, 30 Sep 2019 09:56:17 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 27.09.19 18:16, Richard Henderson wrote:
> On 9/27/19 4:02 AM, David Hildenbrand wrote:
>> On 26.09.19 18:26, Richard Henderson wrote:
>>> We currently set ilen to AUTO, then overwrite that during
>>> unwinding, then overwrite that for the code access case.
>>>
>>> This can be simplified to setting ilen to our arbitrary
>>> value for the (undefined) code access case, then rely on
>>> unwinding to overwrite that with the correct value for
>>> the data access case.
>>>
>>> Signed-off-by: Richard Henderson <address@hidden>
>>> ---
>>> target/s390x/excp_helper.c | 23 +++++++----------------
>>> 1 file changed, 7 insertions(+), 16 deletions(-)
>>>
>>> diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c
>>> index 98a1ee8317..8ce992e639 100644
>>> --- a/target/s390x/excp_helper.c
>>> +++ b/target/s390x/excp_helper.c
>>> @@ -96,7 +96,7 @@ bool s390_cpu_tlb_fill(CPUState *cs, vaddr address, int
>>> size,
>>> {
>>> S390CPU *cpu = S390_CPU(cs);
>>>
>>> - trigger_pgm_exception(&cpu->env, PGM_ADDRESSING, ILEN_AUTO);
>>> + trigger_pgm_exception(&cpu->env, PGM_ADDRESSING, ILEN_UNWIND);
>>
>> Hmm, we always trigger a pgm exceptions, meaning we set
>> cs->exception_index even if we have probe = true. Confused by that.
>
> This is the CONFIG_USER_ONLY version, for which probe is always false.
> Perhaps
> I shouldn't have made the function interface identical, but it did appear to
> make things cleaner for most targets.
>
>>> + trigger_pgm_exception(env, excp, 2);
>>
>> I wonder if it is still worth setting this only conditionally. Most
>> probably not.
>
> I don't see that it would be. I hope the comment is clear about this
> arbitrary
> value is overwritten during unwinding.
It's confusing, but I get it :)
--
Thanks,
David / dhildenb
- Re: [PATCH v3 05/18] target/s390x: Use tcg_s390_program_interrupt in TCG helpers, (continued)
- [PATCH v3 16/18] target/s390x: Remove ILEN_AUTO, Richard Henderson, 2019/09/26
- [PATCH v3 17/18] target/s390x: Remove ilen argument from trigger_access_exception, Richard Henderson, 2019/09/26
- [PATCH v3 04/18] target/s390x: Remove ilen parameter from s390_program_interrupt, Richard Henderson, 2019/09/26
- [PATCH v3 18/18] target/s390x: Remove ilen argument from trigger_pgm_exception, Richard Henderson, 2019/09/26
- Re: [PATCH v3 00/18] target/s390: Use tcg unwinding for ilen, David Hildenbrand, 2019/09/27