qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-arm <qemu-arm@nongnu.org>, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH v3 7/7] target/arm: Honor the HCR_EL2.TTLB bit
Date: Tue, 25 Feb 2020 12:01:33 +0000	[thread overview]
Message-ID: <CAFEAcA_QHoRcfv0oLgxNsuEOaRJOoM9sQHqXZEP-tDeJrziVYw@mail.gmail.com> (raw)
In-Reply-To: <20200218190958.745-8-richard.henderson@linaro.org>

On Tue, 18 Feb 2020 at 19:10, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> This bit traps EL1 access to tlb maintenance insns.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/arm/helper.c | 85 +++++++++++++++++++++++++++++----------------
>  1 file changed, 55 insertions(+), 30 deletions(-)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index 21ee9cf7de..87c0cf4a96 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -563,6 +563,16 @@ static CPAccessResult access_tacr(CPUARMState *env, const ARMCPRegInfo *ri,
>      return CP_ACCESS_OK;
>  }
>
> +/* Check for traps from EL1 due to HCR_EL2.TTLB. */
> +static CPAccessResult access_ttlb(CPUARMState *env, const ARMCPRegInfo *ri,
> +                                  bool isread)
> +{
> +    if (arm_current_el(env) == 1 && (arm_hcr_el2_eff(env) & HCR_TTLB)) {
> +        return CP_ACCESS_TRAP_EL2;
> +    }
> +    return CP_ACCESS_OK;
> +}

The set of operations this traps differs when ARMv8.4-TLBI is
implemented. It looks like you've applied this access fn to
the wider with-v8.4-TLBI set? (eg TLBI_VMALLE1 is only trapped
with ARMv8.4-TLBI, not without.)

thanks
-- PMM


  reply	other threads:[~2020-02-25 13:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-18 19:09 [PATCH v3 0/7] target/arm: Honor more HCR_EL2 traps Richard Henderson
2020-02-18 19:09 ` [PATCH v3 1/7] target/arm: Set ID_MMFR4.HPDS for aarch64_max_initfn Richard Henderson
2020-02-18 19:09 ` [PATCH v3 2/7] target/arm: Honor the HCR_EL2.{TVM,TRVM} bits Richard Henderson
2020-02-25 11:44   ` Peter Maydell
2020-02-18 19:09 ` [PATCH v3 3/7] target/arm: Honor the HCR_EL2.TSW bit Richard Henderson
2020-02-25 11:46   ` Peter Maydell
2020-02-18 19:09 ` [PATCH v3 4/7] target/arm: Honor the HCR_EL2.TACR bit Richard Henderson
2020-02-25 11:48   ` Peter Maydell
2020-02-18 19:09 ` [PATCH v3 5/7] target/arm: Honor the HCR_EL2.TPCP bit Richard Henderson
2020-02-25 11:52   ` Peter Maydell
2020-02-18 19:09 ` [PATCH v3 6/7] target/arm: Honor the HCR_EL2.TPU bit Richard Henderson
2020-02-25 11:56   ` Peter Maydell
2020-02-18 19:09 ` [PATCH v3 7/7] target/arm: Honor the HCR_EL2.TTLB bit Richard Henderson
2020-02-25 12:01   ` Peter Maydell [this message]
2020-02-25 17:46     ` Richard Henderson
2020-02-25 17:49       ` Peter Maydell
2020-02-25 12:02 ` [PATCH v3 0/7] target/arm: Honor more HCR_EL2 traps 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=CAFEAcA_QHoRcfv0oLgxNsuEOaRJOoM9sQHqXZEP-tDeJrziVYw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@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 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).