All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Rebecca Cran <rebecca@nuviainc.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 1/2] target/arm: add support for FEAT_DIT, Data Independent Timing
Date: Fri, 11 Dec 2020 21:37:28 +0000	[thread overview]
Message-ID: <CAFEAcA9NOez16SaKsegpURPtMJDByYQ2MaeUKjQAiKhm=O-7LA@mail.gmail.com> (raw)
In-Reply-To: <46d7b991-d305-bd2f-91f9-cdc2ee1e73ce@linaro.org>

On Fri, 11 Dec 2020 at 19:51, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> 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.

Yes, I think that's the best thing to do. We've been skating
by on CPSR and SPSR being the same thing and it's just
stopped working.

-- PMM


  reply	other threads:[~2020-12-11 21:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11  5:13 [PATCH 0/2] target/arm: Add support for DIT (Data Independent Timing) Rebecca Cran
2020-12-11  5:13 ` [PATCH 1/2] target/arm: add support for FEAT_DIT, Data Independent Timing Rebecca Cran
2020-12-11 14:08   ` Richard Henderson
2020-12-11 19:33     ` Rebecca Cran
2020-12-11 19:51       ` Richard Henderson
2020-12-11 21:37         ` Peter Maydell [this message]
2020-12-14 18:11           ` Rebecca Cran
2020-12-14 18:48             ` Peter Maydell
2020-12-11  5:13 ` [PATCH 2/2] target/arm: Set ID_AA64PFR0.DIT and ID_PFR0.DIT to 1 for "max" AA64 CPU Rebecca Cran
2020-12-11 14:09   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFEAcA9NOez16SaKsegpURPtMJDByYQ2MaeUKjQAiKhm=O-7LA@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rebecca@nuviainc.com \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.