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: Peter Collingbourne <pcc@google.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [PATCH] target/arm: Fix MTE0_ACTIVE
Date: Thu, 7 Jan 2021 17:54:01 +0000	[thread overview]
Message-ID: <CAFEAcA8FrSwpG6GkhxnPQa0h=Lq4Yjv7YWHFDu3DejKOjdJR3A@mail.gmail.com> (raw)
In-Reply-To: <20201221204426.88514-1-richard.henderson@linaro.org>

On Mon, 21 Dec 2020 at 20:44, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> In 50244cc76abc we updated mte_check_fail to match the ARM
> pseudocode, using the correct EL to select the TCF field.
> But we failed to update MTE0_ACTIVE the same way, which led
> to g_assert_not_reached().
>
> Cc: qemu-stable@nongnu.org
> Buglink: https://bugs.launchpad.net/bugs/1907137
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/helper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index 7b8bcd6903..4597081d5d 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -12932,7 +12932,7 @@ static uint32_t rebuild_hflags_a64(CPUARMState *env, int el, int fp_el,
>          if (FIELD_EX32(flags, TBFLAG_A64, UNPRIV)
>              && tbid
>              && !(env->pstate & PSTATE_TCO)
> -            && (sctlr & SCTLR_TCF0)
> +            && (sctlr & SCTLR_TCF)
>              && allocation_tag_access_enabled(env, 0, sctlr)) {
>              flags = FIELD_DP32(flags, TBFLAG_A64, MTE0_ACTIVE, 1);
>          }


I don't understand this change, could you explain a bit more?
In commit 50244cc76abcac we change to looking at the TCF
field corresponding to the actual current EL instead of the
EL for the memory-access. But if we're doing that then why
should we be looking at exclusively SCTLR_TCF0 in this
for-unpriv-access code rather than doing the same thing we do
for normal accesses and checking
  (sctlr & (el == 0 ? SCTLR_TCF0 : SCTLR_TCF))
?

thanks
-- PMM


  reply	other threads:[~2021-01-07 17:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21 20:44 [PATCH] target/arm: Fix MTE0_ACTIVE Richard Henderson
2021-01-07 17:54 ` Peter Maydell [this message]
2021-01-07 19:10   ` Richard Henderson
2021-01-07 19:46     ` Peter Maydell

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='CAFEAcA8FrSwpG6GkhxnPQa0h=Lq4Yjv7YWHFDu3DejKOjdJR3A@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=pcc@google.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --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.