qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] target/arm: add support for FEAT_DIT, Data Independent T


From: Richard Henderson
Subject: Re: [PATCH 1/2] target/arm: add support for FEAT_DIT, Data Independent Timing
Date: Fri, 11 Dec 2020 13:51:40 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 12/11/20 1:33 PM, Rebecca Cran wrote:
> Is the comment in target/arm/op_helper.c:397 still relevant?
> 
> uint32_t HELPER(cpsr_read)(CPUARMState *env)
> {
>     /*
>      * 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);
> }

I forgot about this.  So we can't "just" store DIT in uncached_cpsr.

I'll let Peter weigh in, but I think it makes sense to move the SS bit
somewhere else (e.g. env->pstate) and merge it into SPSR_ELx upon interrupt.
While what we're doing here is convenient, it's not architectural, and it would
be better to follow GetPSRFromPSTATE pseudocode.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]