Skip to content

Commit 0fd1d74

Browse files
danielhbphilmd
authored andcommitted
monitor/hmp-cmds-target: add CPU_DUMP_VPU in hmp_info_registers()
Commit b84694d added the CPU_DUMP_VPU to allow vector registers to be logged by log_cpu_exec() in TCG. This flag was then used in commit b227f6a to print RISC-V vector registers using this flag. Note that this change was done in riscv_cpu_dump_state(), the cpu_dump_state() callback for RISC-V, the same callback used in hmp_info_registers(). Back then we forgot to change hmp_info_registers(), and 'info registers' isn't showing RISC-V vector registers as a result. No other target is impacted since only RISC-V is using CPU_DUMP_VPU. There's no reason to not show VPU regs in info_registers(), so add CPU_DUMP_VPU to hmp_info_registers(). This will print vector registers for all RISC-V machines and, as said above, has no impact in other archs. Cc: Dr. David Alan Gilbert <dave@treblig.org> Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20250623145306.991562-1-dbarboza@ventanamicro.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
1 parent 842e7ee commit 0fd1d74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

monitor/hmp-cmds-target.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ void hmp_info_registers(Monitor *mon, const QDict *qdict)
102102
if (all_cpus) {
103103
CPU_FOREACH(cs) {
104104
monitor_printf(mon, "\nCPU#%d\n", cs->cpu_index);
105-
cpu_dump_state(cs, NULL, CPU_DUMP_FPU);
105+
cpu_dump_state(cs, NULL, CPU_DUMP_FPU | CPU_DUMP_VPU);
106106
}
107107
} else {
108108
cs = vcpu >= 0 ? qemu_get_cpu(vcpu) : mon_get_cpu(mon);
@@ -117,7 +117,7 @@ void hmp_info_registers(Monitor *mon, const QDict *qdict)
117117
}
118118

119119
monitor_printf(mon, "\nCPU#%d\n", cs->cpu_index);
120-
cpu_dump_state(cs, NULL, CPU_DUMP_FPU);
120+
cpu_dump_state(cs, NULL, CPU_DUMP_FPU | CPU_DUMP_VPU);
121121
}
122122
}
123123

0 commit comments

Comments
 (0)