qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/riscv: zvbb implies zvkb
@ 2024-05-16 12:33 Jerry Zhang Jian
  2024-05-17  1:54 ` Frank Chang
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Jerry Zhang Jian @ 2024-05-16 12:33 UTC (permalink / raw)
  To: alistair.francis, palmer, frank.chang, max.chou, paul.walmsley,
	qemu-devel, qemu-riscv
  Cc: Jerry Zhang Jian

- According to RISC-V crypto spec, Zvkb extension is a proper subset of the Zvbb extension.

- Reference: https://github.com/riscv/riscv-crypto/blob/1769c2609bf4535632e0c0fd715778f212bb272e/doc/vector/riscv-crypto-vector-zvkb.adoc?plain=1#L10

Signed-off-by: Jerry Zhang Jian <jerry.zhangjian@sifive.com>
---
 target/riscv/tcg/tcg-cpu.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c
index 40054a391a..f1a1306ab2 100644
--- a/target/riscv/tcg/tcg-cpu.c
+++ b/target/riscv/tcg/tcg-cpu.c
@@ -658,6 +658,10 @@ void riscv_cpu_validate_set_extensions(RISCVCPU *cpu, Error **errp)
         cpu_cfg_ext_auto_update(cpu, CPU_CFG_OFFSET(ext_zvbc), true);
     }
 
+    if (cpu->cfg.ext_zvbb) {
+        cpu_cfg_ext_auto_update(cpu, CPU_CFG_OFFSET(ext_zvkb), true);
+    }
+
     /*
      * In principle Zve*x would also suffice here, were they supported
      * in qemu
-- 
2.42.0



^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-06-04  3:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16 12:33 [PATCH] target/riscv: zvbb implies zvkb Jerry Zhang Jian
2024-05-17  1:54 ` Frank Chang
2024-05-27  5:08 ` Alistair Francis
2024-05-27  5:13 ` Alistair Francis
2024-05-28 12:12   ` Jerry ZJ
2024-05-28 12:21     ` Jerry Zhang Jian
2024-05-28 13:03 ` [PATCH v2] " Jerry Zhang Jian
2024-06-04  3:35   ` Alistair Francis

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).