From: "Christoph Müllner" <christoph.muellner@vrull.eu>
To: qemu-riscv@nongnu.org, qemu-devel@nongnu.org,
Alistair Francis <alistair.francis@wdc.com>,
Bin Meng <bin.meng@windriver.com>,
Philipp Tomsich <philipp.tomsich@vrull.eu>,
Palmer Dabbelt <palmer@dabbelt.com>,
Richard Henderson <richard.henderson@linaro.org>,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
Andrew Jones <ajones@ventanamicro.com>
Cc: "Christoph Müllner" <christoph.muellner@vrull.eu>,
"Laurent Vivier" <laurent@vivier.eu>
Subject: [RFC PATCH v2 2/4] linux-user/riscv: Add Ssdtso extension to hwprobe
Date: Fri, 9 Feb 2024 07:41:15 +0100 [thread overview]
Message-ID: <20240209064117.2746701-3-christoph.muellner@vrull.eu> (raw)
In-Reply-To: <20240209064117.2746701-1-christoph.muellner@vrull.eu>
This patch exposes Ssdtso via hwprobe in QEMU's user space emulator.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
---
linux-user/syscall.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 24fa11d946..bf0d66b8a8 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8829,6 +8829,7 @@ static int do_getdents64(abi_long dirfd, abi_long arg2, abi_long count)
#define RISCV_HWPROBE_EXT_ZTSO (1ULL << 33)
#define RISCV_HWPROBE_EXT_ZACAS (1ULL << 34)
#define RISCV_HWPROBE_EXT_ZICOND (1ULL << 35)
+#define RISCV_HWPROBE_EXT_SSDTSO (1ULL << 36)
#define RISCV_HWPROBE_KEY_CPUPERF_0 5
#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
@@ -8947,6 +8948,8 @@ static void risc_hwprobe_fill_pairs(CPURISCVState *env,
RISCV_HWPROBE_EXT_ZACAS : 0;
value |= cfg->ext_zicond ?
RISCV_HWPROBE_EXT_ZICOND : 0;
+ value |= cfg->ext_ssdtso ?
+ RISCV_HWPROBE_EXT_SSDTSO : 0;
__put_user(value, &pair->value);
break;
case RISCV_HWPROBE_KEY_CPUPERF_0:
--
2.43.0
next prev parent reply other threads:[~2024-02-09 6:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 6:41 [RFC PATCH v2 0/4] RISC-V: Add dynamic TSO support Christoph Müllner
2024-02-09 6:41 ` [RFC PATCH v2 1/4] RISC-V: Add support for Ssdtso Christoph Müllner
2024-02-09 6:41 ` Christoph Müllner [this message]
2024-02-09 6:41 ` [RFC PATCH v2 3/4] linux-user/prctl: Add dynamic memory consistency model prctl API Christoph Müllner
2024-02-09 6:41 ` [RFC PATCH v2 4/4] linux-user/riscv: Implement dynamic memory consistency model support Christoph Müllner
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=20240209064117.2746701-3-christoph.muellner@vrull.eu \
--to=christoph.muellner@vrull.eu \
--cc=ajones@ventanamicro.com \
--cc=alistair.francis@wdc.com \
--cc=bin.meng@windriver.com \
--cc=dbarboza@ventanamicro.com \
--cc=laurent@vivier.eu \
--cc=palmer@dabbelt.com \
--cc=philipp.tomsich@vrull.eu \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@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 read-only IMAP folder(s) and NNTP newsgroup(s).