On 20/3/26 14:56, Peter Maydell wrote:
On Fri, 20 Mar 2026 at 13:51, Philippe Mathieu-Daudé <[email protected]> wrote:

Currently 'info tlb' dumps the MMU information on stdout.
Propagate the @Monitor argument and replace qemu_printf()
by monitor_printf() to dump information over the monitor
(which is not always stdout).

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
  target/xtensa/cpu.h        |  2 +-
  target/xtensa/mmu_helper.c | 44 ++++++++++++++++++--------------------
  target/xtensa/monitor.c    |  2 +-
  3 files changed, 23 insertions(+), 25 deletions(-)


-static void dump_tlb(CPUXtensaState *env, bool dtlb)
+static void dump_tlb(Monitor *mon, CPUXtensaState *env, bool dtlb)
  {
      unsigned wi, ei;
      const xtensa_tlb *conf =
@@ -1091,6 +1091,7 @@ static void dump_tlb(CPUXtensaState *env, bool dtlb)
          xtensa_option_enabled(env->config, XTENSA_OPTION_MMU) ?
          mmu_attr_to_access : region_attr_to_access;

+    monitor_printf(mon, "\n%cTLB:\n", dtlb ? 'D' : 'I');

Shouldn't the change to this function be purely
  s/qemu_printf/monitor_printf(mon, / ?

OK, will split as v2 (but still use puts replacement when no formatting)


Reply via email to