From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2 3/3] target/arm: Flush only the TLBs affected by TTBR*_EL1
Date: Fri, 19 Oct 2018 09:31:10 -0700 [thread overview]
Message-ID: <2c425566-53b5-e299-ccb1-09793ab673d5@linaro.org> (raw)
In-Reply-To: <CAFEAcA8f2SvmsABANVrWLZo8NzeAirMOqsm7AnyPCVVKL_z0Sw@mail.gmail.com>
On 10/19/18 9:12 AM, Peter Maydell wrote:
> A conservative check is probably:
> if arm_current_el() < 3
> // TTBR definitely can only be affecting the EL0/1
> // translation regime for the current security state
> if arm_is_secure_below_el3()
> if EL3 is AArch32
> flush S1SE0, S1E3
> else
> flush S1SE0, S1SE1
> else
> flush S12NSE1, S12NSE0
> else
> // err on the side of flushing more than maybe we need to
> flush S1SE0, S12NSE1, S12NSE0
> if EL3 is AArch32
> flush S1E3
> else
> flush S1SE1
>
> (but you should check my logic ;-))
Riiight.
Clearly it would be simpler and safer to track unused tlbs within cputlb.c.
> We do for AArch32 with TTBCR.EAE == 1 (ie LPAE, when you want to
> use the 64-bit form of the register, accessed via MRRC/MCRR).
> cpreg_field_is_64bit() is true for both "AArch64 sysreg" and
> "AArch32 64-bit cp reg".
Ok, thanks.
So drop this patch for now and I'll get back to it. The other two in this
series are at least incremental improvement in the meantime.
r~
next prev parent reply other threads:[~2018-10-19 16:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-19 1:56 [Qemu-devel] [PATCH v2 0/3] target/arm: Reduce tlb_flush overhead Richard Henderson
2018-10-19 1:56 ` [Qemu-devel] [PATCH v2 1/3] target/arm: Remove writefn from TTBR0_EL3 Richard Henderson
2018-10-19 14:22 ` Peter Maydell
2018-10-19 1:56 ` [Qemu-devel] [PATCH v2 2/3] target/arm: Only flush tlb if ASID changes Richard Henderson
2018-10-19 5:00 ` Philippe Mathieu-Daudé
2018-10-19 14:22 ` Peter Maydell
2018-10-19 1:56 ` [Qemu-devel] [PATCH v2 3/3] target/arm: Flush only the TLBs affected by TTBR*_EL1 Richard Henderson
2018-10-19 14:28 ` Peter Maydell
2018-10-19 15:21 ` Richard Henderson
2018-10-19 16:12 ` Peter Maydell
2018-10-19 16:31 ` Richard Henderson [this message]
2018-10-19 16:37 ` 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=2c425566-53b5-e299-ccb1-09793ab673d5@linaro.org \
--to=richard.henderson@linaro.org \
--cc=peter.maydell@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).