qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org
Subject: Re: [PATCH] target/arm: Correctly propagate stage 1 BTI guarded bit in a two-stage walk
Date: Tue, 31 Oct 2023 11:59:52 -0700	[thread overview]
Message-ID: <1c4e36a3-8092-4cec-a2fd-aea4a84a1ed6@linaro.org> (raw)
In-Reply-To: <20231031173723.26582-1-peter.maydell@linaro.org>

On 10/31/23 10:37, Peter Maydell wrote:
> In a two-stage translation, the result of the BTI guarded bit should
> be the guarded bit from the first stage of translation, as there is
> no BTI guard information in stage two.  Our code tried to do this,
> but got it wrong, because we currently have two fields where the GP
> bit information might live (ARMCacheAttrs::guarded and
> CPUTLBEntryFull::extra::arm::guarded), and we were storing the GP bit
> in the latter during the stage 1 walk but trying to copy the former
> in combine_cacheattrs().
> 
> Remove the duplicated storage, and always use the field in
> CPUTLBEntryFull; correctly propagate the stage 1 value to the output
> in get_phys_addr_twostage().
> 
> Note for stable backports: in v8.0 and earlier the field is named
> result->f.guarded, not result->f.extra.arm.guarded.
> 
> Cc: qemu-stable@nongnu.org
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1950
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>   target/arm/internals.h | 1 -
>   target/arm/ptw.c       | 7 +++++--
>   2 files changed, 5 insertions(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~


      reply	other threads:[~2023-10-31 19:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 17:37 [PATCH] target/arm: Correctly propagate stage 1 BTI guarded bit in a two-stage walk Peter Maydell
2023-10-31 18:59 ` Richard Henderson [this message]

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=1c4e36a3-8092-4cec-a2fd-aea4a84a1ed6@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).