From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Subject: Re: [PATCH 2/4] target/arm: Allow writes to FNG1, FNG0, A2
Date: Fri, 5 Dec 2025 09:30:04 -0600 [thread overview]
Message-ID: <59cb24e2-699e-4511-84e5-ad5d3ee90b58@linaro.org> (raw)
In-Reply-To: <20251204180617.1190660-3-jim.macarthur@linaro.org>
On 12/4/25 12:04, Jim MacArthur wrote:
> @@ -6121,8 +6131,16 @@ static void tcr2_el2_write(CPUARMState *env, const ARMCPRegInfo *ri,
> if (cpu_isar_feature(aa64_mec, cpu)) {
> valid_mask |= TCR2_AMEC0 | TCR2_AMEC1;
> }
> + if (cpu_isar_feature(aa64_asid2, cpu)) {
> + valid_mask |= TCR2_FNG1 | TCR2_FNG0 | TCR2_A2;
> + require_flush = true;
> + }
> value &= valid_mask;
> raw_write(env, ri, value);
> +
> + if (require_flush) {
> + tlb_flush(CPU(cpu));
> + }
Just because A2 is valid doesn't mean the A2 bit changed.
Compare, for instance, vmsa_ttbr_write, where we notice if the ASID has changed before
performing the flush.
Note as well that we don't need to flush all tlbs. In tcr2_el1_write we know that we are
only affecting the EL1&0 regime (alle1_tlbmask). In tcr2_el2_write, we know that we are
only affecting the EL2&0 regime (see the E2H part of vae2_tlbmask).
r~
next prev parent reply other threads:[~2025-12-05 15:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-04 18:04 [PATCH V5 0/4] Basic ASID2 support Jim MacArthur
2025-12-04 18:04 ` [PATCH 1/4] target/arm: Enable ID_AA64MMFR4_EL1 register Jim MacArthur
2025-12-04 18:04 ` [PATCH 2/4] target/arm: Allow writes to FNG1, FNG0, A2 Jim MacArthur
2025-12-05 15:30 ` Richard Henderson [this message]
2025-12-09 15:04 ` Jim MacArthur
2025-12-09 15:39 ` Richard Henderson
2025-12-04 18:04 ` [PATCH 3/4] target/arm/tcg/cpu64.c: Enable ASID2 for cpu_max Jim MacArthur
2025-12-04 18:04 ` [PATCH 4/4] tests: Add test for ASID2 and write/read of feature bits Jim MacArthur
2025-12-04 18:30 ` [PATCH V5 0/4] Basic ASID2 support Alex Bennée
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=59cb24e2-699e-4511-84e5-ad5d3ee90b58@linaro.org \
--to=richard.henderson@linaro.org \
--cc=qemu-devel@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).