[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 08/20] target/arm: Remove CPSR_RESERVED
From: |
Richard Henderson |
Subject: |
Re: [PATCH v3 08/20] target/arm: Remove CPSR_RESERVED |
Date: |
Sat, 8 Feb 2020 08:26:18 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 2/7/20 5:36 PM, Peter Maydell wrote:
>> - return cpsr_read(env) & ~(CPSR_EXEC | CPSR_RESERVED);
>> + /*
>> + * We store the ARMv8 PSTATE.SS bit in env->uncached_cpsr.
>> + * This is convenient for populating SPSR_ELx, but must be
>> + * hidden from aarch32 mode, where it is not visible.
>> + *
>> + * TODO: ARMv8.4-DIT -- need to move SS somewhere else.
>> + */
>> + return cpsr_read(env) & ~(CPSR_EXEC | PSTATE_SS);
>
> So previously we were masking out [23:21], and now we only mask
> out [21]. Is this OK because we've now masked everywhere that
> might have been able to write non-zero to [23:22] ?
Yes.
On the chance that I've missed one, we'll now call anything that fails to do so
a bug there, and not here. ;-)
> (regarding the TODO comment, I guess the obvious place would
> be env->pstate.)
That was my thought too. That env->pstate & PSTATE_SS would be where we leave
that bit all of the time, even when the rest of pstate is inactive in aa32 mode.
r~
- [PATCH v3 01/20] target/arm: Add arm_mmu_idx_is_stage1_of_2, (continued)
- [PATCH v3 01/20] target/arm: Add arm_mmu_idx_is_stage1_of_2, Richard Henderson, 2020/02/03
- [PATCH v3 03/20] target/arm: Add isar_feature tests for PAN + ATS1E1, Richard Henderson, 2020/02/03
- [PATCH v3 04/20] target/arm: Move LOR regdefs to file scope, Richard Henderson, 2020/02/03
- [PATCH v3 02/20] target/arm: Add mmu_idx for EL1 and EL2 w/ PAN enabled, Richard Henderson, 2020/02/03
- [PATCH v3 05/20] target/arm: Split out aarch32_cpsr_valid_mask, Richard Henderson, 2020/02/03
- [PATCH v3 07/20] target/arm: Use aarch32_cpsr_valid_mask in helper_exception_return, Richard Henderson, 2020/02/03
- [PATCH v3 08/20] target/arm: Remove CPSR_RESERVED, Richard Henderson, 2020/02/03
- [PATCH v3 09/20] target/arm: Tidy msr_mask, Richard Henderson, 2020/02/03
- [PATCH v3 06/20] target/arm: Replace CPSR_ERET_MASK with aarch32_cpsr_valid_mask, Richard Henderson, 2020/02/03
- [PATCH v3 10/20] target/arm: Introduce aarch64_pstate_valid_mask, Richard Henderson, 2020/02/03
- [PATCH v3 11/20] target/arm: Update MSR access for PAN, Richard Henderson, 2020/02/03
- [PATCH v3 12/20] target/arm: Update arm_mmu_idx_el for PAN, Richard Henderson, 2020/02/03