Skip to contentSkip to conversation

target/riscv: remove warnings about Smdbltrp/Smrnmi being disabled

PATCH Applied Clément Léger 3 participants 3 messages Feb 13, 2025 – Feb 17, 2025 RISC-V

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 target/riscv: remove warnings about Smdbltrp/Smrnmi being disabled

As raised by Richard Henderson, these warnings are displayed in user only as well. Since they aren't really useful for the end-user, remove them and add a "TODO" note in the leading comments.

---

v2:
- Remove Tommy bouncing mail from the recipient list
- Entirely remove warnings and add "TODO" in the leading comments

 target/riscv/tcg/tcg-cpu.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
target/riscv/tcg/tcg-cpu.c +3 -5
index 0a137281de..94bfafd7db 100644
@@ -1432,22 +1432,20 @@ static void riscv_init_max_cpu_extensions(Object *obj)
     }
 
     /*
-     * ext_smrnmi requires OpenSBI changes that our current
+     * TODO: ext_smrnmi requires OpenSBI changes that our current
      * image does not have. Disable it for now.
      */
     if (cpu->cfg.ext_smrnmi) {
         isa_ext_update_enabled(cpu, CPU_CFG_OFFSET(ext_smrnmi), false);
-        qemu_log("Smrnmi is disabled in the 'max' type CPU\n");
     }
 
     /*
-     * ext_smdbltrp requires the firmware to clear MSTATUS.MDT on startup to
-     * avoid generating a double trap. OpenSBI does not currently support it,
+     * TODO: ext_smdbltrp requires the firmware to clear MSTATUS.MDT on startup
+     * to avoid generating a double trap. OpenSBI does not currently support it,
      * disable it for now.
      */
     if (cpu->cfg.ext_smdbltrp) {
         isa_ext_update_enabled(cpu, CPU_CFG_OFFSET(ext_smdbltrp), false);
-        qemu_log("Smdbltrp is disabled in the 'max' type CPU\n");
     }
 }
 
Signature · 1 line
2.47.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 6 lines · Clément Léger

As raised by Richard Henderson, these warnings are displayed in user only as well. Since they aren't really useful for the end-user, remove them and add a "TODO" note in the leading comments.

---

Quoted 38 lines

v2:
- Remove Tommy bouncing mail from the recipient list
- Entirely remove warnings and add "TODO" in the leading comments

  target/riscv/tcg/tcg-cpu.c | 8 +++-----
  1 file changed, 3 insertions(+), 5 deletions(-)
target/riscv/tcg/tcg-cpu.c +3 -5
index 0a137281de..94bfafd7db 100644
@@ -1432,22 +1432,20 @@ static void riscv_init_max_cpu_extensions(Object *obj)
      }
 
      /*
-     * ext_smrnmi requires OpenSBI changes that our current
+     * TODO: ext_smrnmi requires OpenSBI changes that our current
       * image does not have. Disable it for now.
       */
      if (cpu->cfg.ext_smrnmi) {
          isa_ext_update_enabled(cpu, CPU_CFG_OFFSET(ext_smrnmi), false);
-        qemu_log("Smrnmi is disabled in the 'max' type CPU\n");
      }
 
      /*
-     * ext_smdbltrp requires the firmware to clear MSTATUS.MDT on startup to
-     * avoid generating a double trap. OpenSBI does not currently support it,
+     * TODO: ext_smdbltrp requires the firmware to clear MSTATUS.MDT on startup
+     * to avoid generating a double trap. OpenSBI does not currently support it,
       * disable it for now.
       */
      if (cpu->cfg.ext_smdbltrp) {
          isa_ext_update_enabled(cpu, CPU_CFG_OFFSET(ext_smdbltrp), false);
-        qemu_log("Smdbltrp is disabled in the 'max' type CPU\n");
      }
  }
 
#2 lore raw
In reply to Clément Léger
Quoted 6 lines · Clément Léger

As raised by Richard Henderson, these warnings are displayed in user only as well. Since they aren't really useful for the end-user, remove them and add a "TODO" note in the leading comments.

Thanks!

Applied to riscv-to-apply.next

Alistair

Quoted 43 lines

---

v2:
- Remove Tommy bouncing mail from the recipient list
- Entirely remove warnings and add "TODO" in the leading comments

 target/riscv/tcg/tcg-cpu.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
target/riscv/tcg/tcg-cpu.c +3 -6
index 0a137281de..94bfafd7db 100644
@@ -1432,22 +1432,20 @@ static void riscv_init_max_cpu_extensions(Object *obj)
     }
 
     /*
-     * ext_smrnmi requires OpenSBI changes that our current
+     * TODO: ext_smrnmi requires OpenSBI changes that our current
      * image does not have. Disable it for now.
      */
     if (cpu->cfg.ext_smrnmi) {
         isa_ext_update_enabled(cpu, CPU_CFG_OFFSET(ext_smrnmi), false);
-        qemu_log("Smrnmi is disabled in the 'max' type CPU\n");
     }
 
     /*
-     * ext_smdbltrp requires the firmware to clear MSTATUS.MDT on startup to
-     * avoid generating a double trap. OpenSBI does not currently support it,
+     * TODO: ext_smdbltrp requires the firmware to clear MSTATUS.MDT on startup
+     * to avoid generating a double trap. OpenSBI does not currently support it,
      * disable it for now.
      */
     if (cpu->cfg.ext_smdbltrp) {
         isa_ext_update_enabled(cpu, CPU_CFG_OFFSET(ext_smdbltrp), false);
-        qemu_log("Smdbltrp is disabled in the 'max' type CPU\n");
     }
 }
 
--

2.47.2