[PATCH v7 1/8] target/riscv: Add Zicclsm CPU option

frank.chang@sifive.com posted 8 patches 1 month, 1 week ago
Maintainers: Alistair Francis <Alistair.Francis@wdc.com>, Palmer Dabbelt <palmer@dabbelt.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Chao Liu <chao.liu@processmission.com>
There is a newer version of this series
[PATCH v7 1/8] target/riscv: Add Zicclsm CPU option
Posted by frank.chang@sifive.com 1 month, 1 week ago
From: Frank Chang <frank.chang@sifive.com>

Add Zicclsm CPU option so that user can turn on/off misaligned loads
and stores support.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Max Chou <max.chou@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
---
 target/riscv/cpu_cfg_fields.h.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/riscv/cpu_cfg_fields.h.inc b/target/riscv/cpu_cfg_fields.h.inc
index 9eb47af0a76..f8c27a574f8 100644
--- a/target/riscv/cpu_cfg_fields.h.inc
+++ b/target/riscv/cpu_cfg_fields.h.inc
@@ -139,6 +139,8 @@ BOOL_FIELD(has_priv_1_11)
 /* Always enabled for TCG if has_priv_1_11 */
 BOOL_FIELD(ext_ziccrse)
 
+BOOL_FIELD(ext_zicclsm)
+
 /* Vendor-specific custom extensions */
 BOOL_FIELD(ext_xtheadba)
 BOOL_FIELD(ext_xtheadbb)
-- 
2.43.0
Re: [PATCH v7 1/8] target/riscv: Add Zicclsm CPU option
Posted by Daniel Henrique Barboza 1 month, 1 week ago
Hi Frank!

On 8/5/2026 1:43 PM, frank.chang@sifive.com wrote:
> From: Frank Chang <frank.chang@sifive.com>
> 
> Add Zicclsm CPU option so that user can turn on/off misaligned loads
> and stores support.
> 
> Signed-off-by: Frank Chang <frank.chang@sifive.com>
> Reviewed-by: Max Chou <max.chou@sifive.com>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>   target/riscv/cpu_cfg_fields.h.inc | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/target/riscv/cpu_cfg_fields.h.inc b/target/riscv/cpu_cfg_fields.h.inc
> index 9eb47af0a76..f8c27a574f8 100644
> --- a/target/riscv/cpu_cfg_fields.h.inc
> +++ b/target/riscv/cpu_cfg_fields.h.inc
> @@ -139,6 +139,8 @@ BOOL_FIELD(has_priv_1_11)
>   /* Always enabled for TCG if has_priv_1_11 */
>   BOOL_FIELD(ext_ziccrse)
>   
> +BOOL_FIELD(ext_zicclsm)
> +

This is a needed step but, as is, it's not adding a new CPU option for users as
the commit msg says.  This is being done in patch 7.

I think this change should be squashed into patch 2, where ext_zicclsm is being
added in eligible CPUs.


Thanks,
Daniel

>   /* Vendor-specific custom extensions */
>   BOOL_FIELD(ext_xtheadba)
>   BOOL_FIELD(ext_xtheadbb)
Re: [PATCH v7 1/8] target/riscv: Add Zicclsm CPU option
Posted by Frank Chang 1 month, 1 week ago
Hi Daniel,

On Fri, Aug 7, 2026 at 9:49 PM Daniel Henrique Barboza <
daniel.barboza@oss.qualcomm.com> wrote:

> Hi Frank!
>
> On 8/5/2026 1:43 PM, frank.chang@sifive.com wrote:
> > From: Frank Chang <frank.chang@sifive.com>
> >
> > Add Zicclsm CPU option so that user can turn on/off misaligned loads
> > and stores support.
> >
> > Signed-off-by: Frank Chang <frank.chang@sifive.com>
> > Reviewed-by: Max Chou <max.chou@sifive.com>
> > Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
> > ---
> >   target/riscv/cpu_cfg_fields.h.inc | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/target/riscv/cpu_cfg_fields.h.inc
> b/target/riscv/cpu_cfg_fields.h.inc
> > index 9eb47af0a76..f8c27a574f8 100644
> > --- a/target/riscv/cpu_cfg_fields.h.inc
> > +++ b/target/riscv/cpu_cfg_fields.h.inc
> > @@ -139,6 +139,8 @@ BOOL_FIELD(has_priv_1_11)
> >   /* Always enabled for TCG if has_priv_1_11 */
> >   BOOL_FIELD(ext_ziccrse)
> >
> > +BOOL_FIELD(ext_zicclsm)
> > +
>
> This is a needed step but, as is, it's not adding a new CPU option for
> users as
> the commit msg says.  This is being done in patch 7.
>
> I think this change should be squashed into patch 2, where ext_zicclsm is
> being
> added in eligible CPUs.
>

Thanks for the review.

I've squashed patch 1 into patch 2 and sent out the v8 patchset:
https://lore.kernel.org/qemu-riscv/20260810055618.1175500-1-frank.chang@sifive.com/

Regards,
Frank Chang


>
>
> Thanks,
> Daniel
>
> >   /* Vendor-specific custom extensions */
> >   BOOL_FIELD(ext_xtheadba)
> >   BOOL_FIELD(ext_xtheadbb)
>
>