qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org,
	 Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Subject: [RFC PATCH 2/4] arm/tcg: add decodetree entry for DSB nXS variant
Date: Mon, 14 Oct 2024 13:48:56 +0300	[thread overview]
Message-ID: <20241014-arm-feat-xs-v1-2-42bb714d6b11@linaro.org> (raw)
In-Reply-To: <20241014-arm-feat-xs-v1-0-42bb714d6b11@linaro.org>

The DSB nXS variant is always both a reads and writes request type.
Ignore the domain field like we do in plain DSB and perform a full
system barrier operation.

The DSB nXS variant is part of FEAT_XS made mandatory from Armv8.7.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 target/arm/tcg/a64.decode      | 3 +++
 target/arm/tcg/translate-a64.c | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/target/arm/tcg/a64.decode b/target/arm/tcg/a64.decode
index 331a8e180c0b14e2abe3ec641a867235574316f7..c4f516abc18224932082cdf3e7530edc7a304bc1 100644
--- a/target/arm/tcg/a64.decode
+++ b/target/arm/tcg/a64.decode
@@ -245,6 +245,9 @@ WFIT            1101 0101 0000 0011 0001 0000 001 rd:5
 
 CLREX           1101 0101 0000 0011 0011 ---- 010 11111
 DSB_DMB         1101 0101 0000 0011 0011 domain:2 types:2 10- 11111
+# For the DSB nXS variant, types always equals MBReqTypes_All and we ignore the
+# domain bits.
+DSB_nXS         1101 0101 0000 0011 0011 -- 10 001 11111
 ISB             1101 0101 0000 0011 0011 ---- 110 11111
 SB              1101 0101 0000 0011 0011 0000 111 11111
 
diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c
index 071b6349fc38802a62f4b4056e369c4d8b1ecf94..85e71599203eee62b4d22a0b10ed676cc815dab6 100644
--- a/target/arm/tcg/translate-a64.c
+++ b/target/arm/tcg/translate-a64.c
@@ -1959,6 +1959,12 @@ static bool trans_DSB_DMB(DisasContext *s, arg_DSB_DMB *a)
     return true;
 }
 
+static bool trans_DSB_nXS(DisasContext *ctx, arg_DSB_nXS *a)
+{
+    tcg_gen_mb(TCG_BAR_SC | TCG_MO_ALL);
+    return true;
+}
+
 static bool trans_ISB(DisasContext *s, arg_ISB *a)
 {
     /*

-- 
2.45.2



  parent reply	other threads:[~2024-10-14 10:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 10:48 [RFC PATCH 0/4] No-op support for Arm FEAT_XS, feedback needed Manos Pitsidianakis
2024-10-14 10:48 ` [RFC PATCH 1/4] arm: Add FEAT_XS's TLBI NXS variants Manos Pitsidianakis
2024-10-14 16:21   ` Richard Henderson
2024-10-14 10:48 ` Manos Pitsidianakis [this message]
2024-10-14 16:30   ` [RFC PATCH 2/4] arm/tcg: add decodetree entry for DSB nXS variant Richard Henderson
2024-10-14 10:48 ` [RFC PATCH 3/4] arm/tcg/cpu64: add FEAT_XS feat in max cpu Manos Pitsidianakis
2024-10-14 16:31   ` Richard Henderson
2024-10-14 16:32   ` Richard Henderson
2024-10-14 10:48 ` [RFC PATCH 4/4] tests/tcg/aarch64: add system test for FEAT_XS Manos Pitsidianakis
2024-10-14 16:33   ` Richard Henderson
2024-10-14 17:35   ` Gustavo Romero
2024-10-14 16:41 ` [RFC PATCH 0/4] No-op support for Arm FEAT_XS, feedback needed Peter Maydell
2024-10-14 17:32 ` Gustavo Romero

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=20241014-arm-feat-xs-v1-2-42bb714d6b11@linaro.org \
    --to=manos.pitsidianakis@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.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).