diff mbox series

[v3,2/2] target/riscv: Export sdtrig in ISA string

Message ID 20240229133745.771154-3-hchauhan@ventanamicro.com
State New
Headers show
Series Export debug triggers as an extension | expand

Commit Message

Himanshu Chauhan Feb. 29, 2024, 1:37 p.m. UTC
This patch adds "sdtrig" in the ISA string when sdtrig extension is enabled.
The sdtrig extension may or may not be implemented in a system. Therefore, the
            -cpu rv64,sdtrig=<true/false>
option can be used to dynamically turn sdtrig extension on or off.

Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com>
---
 target/riscv/cpu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 5d5d8f0375..6f98c0195c 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -1461,6 +1461,7 @@  const RISCVCPUMultiExtConfig riscv_cpu_extensions[] = {
     MULTI_EXT_CFG_BOOL("zve64d", ext_zve64d, false),
     MULTI_EXT_CFG_BOOL("sstc", ext_sstc, true),
 
+    MULTI_EXT_CFG_BOOL("sdtrig", ext_sdtrig, true),
     MULTI_EXT_CFG_BOOL("smepmp", ext_smepmp, false),
     MULTI_EXT_CFG_BOOL("smstateen", ext_smstateen, false),
     MULTI_EXT_CFG_BOOL("svadu", ext_svadu, true),
@@ -1724,7 +1725,7 @@  static void prop_debug_set(Object *obj, Visitor *v, const char *name,
     RISCVCPU *cpu = RISCV_CPU(obj);
     bool value;
 
-    warn_report("\"debug\" property is being deprecated.");
+    warn_report("\"debug\" property is deprecated; use \"sdtrig\"");
 
     visit_type_bool(v, name, &value, errp);