All of lore.kernel.org
 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 4/4] target/arm: Enable TBI for user-only
Date: Thu, 10 Jan 2019 23:49:51 +1100	[thread overview]
Message-ID: <20190110124951.15473-5-richard.henderson@linaro.org> (raw)
In-Reply-To: <20190110124951.15473-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").

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 14bc24a35a..5eff6995ee 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -174,6 +174,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-01-10 12:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10 12:49 [Qemu-devel] [PATCH 0/4] target/arm: Implement TBI for user-only Richard Henderson
2019-01-10 12:49 ` [Qemu-devel] [PATCH 1/4] target/arm: Add TBFLAG_A64_TBID, split out gen_top_byte_ignore Richard Henderson
2019-01-22 15:52   ` Peter Maydell
2019-01-10 12:49 ` [Qemu-devel] [PATCH 2/4] target/arm: Clean TBI for data operations in the translator Richard Henderson
2019-01-22 15:56   ` Peter Maydell
2019-01-10 12:49 ` [Qemu-devel] [PATCH 3/4] target/arm: Compute TB_FLAGS for TBI for user-only Richard Henderson
2019-01-22 15:57   ` Peter Maydell
2019-01-10 12:49 ` Richard Henderson [this message]
2019-01-22 15:59   ` [Qemu-devel] [PATCH 4/4] target/arm: Enable " 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=20190110124951.15473-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.