[PATCH 2/2] linux-user/riscv: Add Ztso extension to hwprobe

Christoph Müllner posted 2 patches 9 months, 3 weeks ago
Maintainers: Laurent Vivier <laurent@vivier.eu>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Bin Meng <bin.meng@windriver.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
[PATCH 2/2] linux-user/riscv: Add Ztso extension to hwprobe
Posted by Christoph Müllner 9 months, 3 weeks ago
This patch exposes Ztso 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 3ba20f99ad..24fa11d946 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8826,6 +8826,7 @@ static int do_getdents64(abi_long dirfd, abi_long arg2, abi_long count)
 #define		RISCV_HWPROBE_EXT_ZVFH		(1 << 30)
 #define		RISCV_HWPROBE_EXT_ZVFHMIN	(1 << 31)
 #define		RISCV_HWPROBE_EXT_ZFA		(1ULL << 32)
+#define		RISCV_HWPROBE_EXT_ZTSO		(1ULL << 33)
 #define		RISCV_HWPROBE_EXT_ZACAS		(1ULL << 34)
 #define		RISCV_HWPROBE_EXT_ZICOND	(1ULL << 35)
 
@@ -8940,6 +8941,8 @@ static void risc_hwprobe_fill_pairs(CPURISCVState *env,
                      RISCV_HWPROBE_EXT_ZVFHMIN : 0;
             value |= cfg->ext_zfa ?
                      RISCV_HWPROBE_EXT_ZFA : 0;
+            value |= cfg->ext_ztso ?
+                     RISCV_HWPROBE_EXT_ZTSO : 0;
             value |= cfg->ext_zacas ?
                      RISCV_HWPROBE_EXT_ZACAS : 0;
             value |= cfg->ext_zicond ?
-- 
2.43.0


Re: [PATCH 2/2] linux-user/riscv: Add Ztso extension to hwprobe
Posted by Alistair Francis 9 months ago
On Wed, Feb 7, 2024 at 10:25 PM Christoph Müllner
<christoph.muellner@vrull.eu> wrote:
>
> This patch exposes Ztso via hwprobe in QEMU's user space emulator.
>
> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  linux-user/syscall.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 3ba20f99ad..24fa11d946 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -8826,6 +8826,7 @@ static int do_getdents64(abi_long dirfd, abi_long arg2, abi_long count)
>  #define                RISCV_HWPROBE_EXT_ZVFH          (1 << 30)
>  #define                RISCV_HWPROBE_EXT_ZVFHMIN       (1 << 31)
>  #define                RISCV_HWPROBE_EXT_ZFA           (1ULL << 32)
> +#define                RISCV_HWPROBE_EXT_ZTSO          (1ULL << 33)
>  #define                RISCV_HWPROBE_EXT_ZACAS         (1ULL << 34)
>  #define                RISCV_HWPROBE_EXT_ZICOND        (1ULL << 35)
>
> @@ -8940,6 +8941,8 @@ static void risc_hwprobe_fill_pairs(CPURISCVState *env,
>                       RISCV_HWPROBE_EXT_ZVFHMIN : 0;
>              value |= cfg->ext_zfa ?
>                       RISCV_HWPROBE_EXT_ZFA : 0;
> +            value |= cfg->ext_ztso ?
> +                     RISCV_HWPROBE_EXT_ZTSO : 0;
>              value |= cfg->ext_zacas ?
>                       RISCV_HWPROBE_EXT_ZACAS : 0;
>              value |= cfg->ext_zicond ?
> --
> 2.43.0
>
>
Re: [PATCH 2/2] linux-user/riscv: Add Ztso extension to hwprobe
Posted by Daniel Henrique Barboza 9 months, 2 weeks ago

On 2/7/24 09:22, Christoph Müllner wrote:
> This patch exposes Ztso via hwprobe in QEMU's user space emulator.
> 
> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
> ---

Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

>   linux-user/syscall.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 3ba20f99ad..24fa11d946 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -8826,6 +8826,7 @@ static int do_getdents64(abi_long dirfd, abi_long arg2, abi_long count)
>   #define		RISCV_HWPROBE_EXT_ZVFH		(1 << 30)
>   #define		RISCV_HWPROBE_EXT_ZVFHMIN	(1 << 31)
>   #define		RISCV_HWPROBE_EXT_ZFA		(1ULL << 32)
> +#define		RISCV_HWPROBE_EXT_ZTSO		(1ULL << 33)
>   #define		RISCV_HWPROBE_EXT_ZACAS		(1ULL << 34)
>   #define		RISCV_HWPROBE_EXT_ZICOND	(1ULL << 35)
>   
> @@ -8940,6 +8941,8 @@ static void risc_hwprobe_fill_pairs(CPURISCVState *env,
>                        RISCV_HWPROBE_EXT_ZVFHMIN : 0;
>               value |= cfg->ext_zfa ?
>                        RISCV_HWPROBE_EXT_ZFA : 0;
> +            value |= cfg->ext_ztso ?
> +                     RISCV_HWPROBE_EXT_ZTSO : 0;
>               value |= cfg->ext_zacas ?
>                        RISCV_HWPROBE_EXT_ZACAS : 0;
>               value |= cfg->ext_zicond ?