[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 01/18] target/s390x: Truncate 32-bit psw_addr before creat
From: |
Richard Henderson |
Subject: |
Re: [PATCH v3 01/18] target/s390x: Truncate 32-bit psw_addr before creating TB |
Date: |
Fri, 27 Sep 2019 11:24:59 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 9/27/19 3:23 AM, David Hildenbrand wrote:
>> + pc = env->psw.addr;
>> + if (!(flags & FLAG_MASK_64)) {
>> + pc &= 0x7fffffff;
>> + }
>
> If you're fancy, you could also add 24-bit addressing mode wrapping.
>
> Maybe unlikely(!(flags & FLAG_MASK_64)), but not sure how big the gain
> will actually be.
So, it appears that this patch, and the existing code in
s390x_tr_init_disas_context, are wrong.
Page 4-7 of the v11 PoO says that we must generate a specification exception
and not wrap. I believe that the only way to force this to happen is with an
explicit LOAD PSW EXTENDED instruction. Branches and sequential instruction
execution both wrap the addresses before writing back to the PSW.
I will drop this patch for now and we'll look again at instruction address
later.
r~
[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
[PATCH v3 03/18] target/s390x: Remove ilen parameter from tcg_s390_program_interrupt, Richard Henderson, 2019/09/26
[PATCH v3 09/18] target/s390x: Remove exc argument to mmu_translate_asce, Richard Henderson, 2019/09/26