qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PATCH v2 4/4] target/arm: Enable TBI for user-only
Date: Mon,  4 Feb 2019 13:21:26 +0000	[thread overview]
Message-ID: <20190204132126.3255-5-richard.henderson@linaro.org> (raw)
In-Reply-To: <20190204132126.3255-1-richard.henderson@linaro.org>

This has been enabled in the linux kernel since v3.11
(commit d50240a5f6cea, 2013-09-03,
"arm64: mm: permit use of tagged pointers at EL0").

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/cpu.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 3874dc9875..edf6e0e1f1 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -200,6 +200,12 @@ static void arm_cpu_reset(CPUState *s)
         env->vfp.zcr_el[1] = cpu->sve_max_vq - 1;
         env->vfp.zcr_el[2] = env->vfp.zcr_el[1];
         env->vfp.zcr_el[3] = env->vfp.zcr_el[1];
+        /*
+         * Enable TBI0 and TBI1.  While the real kernel only enables TBI0,
+         * turning on both here will produce smaller code and otherwise
+         * make no difference to the user-level emulation.
+         */
+        env->cp15.tcr_el[1].raw_tcr = (3ULL << 37);
 #else
         /* Reset into the highest available EL */
         if (arm_feature(env, ARM_FEATURE_EL3)) {
-- 
2.17.2

  parent reply	other threads:[~2019-02-04 13:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-04 13:21 [Qemu-devel] [PATCH v2 0/4] target/arm: Implement TBI for user-only Richard Henderson
2019-02-04 13:21 ` [Qemu-devel] [PATCH v2 1/4] target/arm: Add TBFLAG_A64_TBID, split out gen_top_byte_ignore Richard Henderson
2019-02-04 13:21 ` [Qemu-devel] [PATCH v2 2/4] target/arm: Clean TBI for data operations in the translator Richard Henderson
2019-02-04 13:21 ` [Qemu-devel] [PATCH v2 3/4] target/arm: Compute TB_FLAGS for TBI for user-only Richard Henderson
2019-02-04 14:45   ` Peter Maydell
2019-02-04 14:53     ` Richard Henderson
2019-02-04 13:21 ` Richard Henderson [this message]
2019-02-04 14:14 ` [Qemu-devel] [PATCH v2 0/4] target/arm: Implement " 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=20190204132126.3255-5-richard.henderson@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).