@@ -158,6 +158,16 @@ points was removed in 7.0. However QMP still exposed the vcpu
parameter. This argument has now been deprecated and the remaining
remaining trace points that used it are selected just by name.
+Human Monitor Protocol (HMP) commands
+-------------------------------------
+
+``info tlb`` and ``info mem`` (since 9.0)
+'''''''''''''''''''''''''''''''''''''''''
+
+The ``info tlb`` and ``info mem`` commands have been replaced by
+the ``info mmu`` command, which has the same behaviour but a less
+misleading name.
+
Host Architectures
------------------
@@ -46,7 +46,9 @@ CPUState *mon_get_cpu(Monitor *mon);
void hmp_info_mmu(Monitor *mon, const QDict *qdict);
void hmp_info_mem(Monitor *mon, const QDict *qdict);
+void hmp_info_mem_deprecated(Monitor *mon, const QDict *qdict);
void hmp_info_tlb(Monitor *mon, const QDict *qdict);
+void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict);
void hmp_mce(Monitor *mon, const QDict *qdict);
void hmp_info_local_apic(Monitor *mon, const QDict *qdict);
void hmp_info_sev(Monitor *mon, const QDict *qdict);
@@ -382,19 +382,31 @@ void hmp_gpa2hpa(Monitor *mon, const QDict *qdict)
#endif
__attribute__((weak))
-void hmp_info_mem(Monitor *mon, const QDict *qdict)
+void hmp_info_mem_deprecated(Monitor *mon, const QDict *qdict)
{
monitor_puts(mon,
"No per-CPU mapping information available on this target\n");
}
__attribute__((weak))
-void hmp_info_tlb(Monitor *mon, const QDict *qdict)
+void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict)
{
monitor_puts(mon,
"No per-CPU TLB information available on this target\n");
}
+void hmp_info_mem(Monitor *mon, const QDict *qdict)
+{
+ monitor_puts(mon, "This command is deprecated, please use 'info mmu -m'\n");
+ hmp_info_mem_deprecated(mon, qdict);
+}
+
+void hmp_info_tlb(Monitor *mon, const QDict *qdict)
+{
+ monitor_puts(mon, "This command is deprecated, please use 'info mmu -t'\n");
+ hmp_info_tlb_deprecated(mon, qdict);
+}
+
void hmp_info_mmu(Monitor *mon, const QDict *qdict)
{
bool tlb = qdict_get_try_bool(qdict, "tlb", false);
@@ -410,9 +422,9 @@ void hmp_info_mmu(Monitor *mon, const QDict *qdict)
}
if (mem) {
- hmp_info_mem(mon, qdict);
+ hmp_info_mem_deprecated(mon, qdict);
}
if (tlb) {
- hmp_info_tlb(mon, qdict);
+ hmp_info_tlb_deprecated(mon, qdict);
}
}
@@ -217,7 +217,7 @@ static void tlb_info_la57(Monitor *mon, CPUArchState *env)
}
#endif /* TARGET_X86_64 */
-void hmp_info_tlb(Monitor *mon, const QDict *qdict)
+void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict)
{
CPUArchState *env;
@@ -545,7 +545,7 @@ static void mem_info_la57(Monitor *mon, CPUArchState *env)
}
#endif /* TARGET_X86_64 */
-void hmp_info_mem(Monitor *mon, const QDict *qdict)
+void hmp_info_mem_deprecated(Monitor *mon, const QDict *qdict)
{
CPUArchState *env;
@@ -10,7 +10,7 @@
#include "monitor/hmp-target.h"
#include "monitor/monitor.h"
-void hmp_info_tlb(Monitor *mon, const QDict *qdict)
+void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict)
{
CPUArchState *env1 = mon_get_cpu_env(mon);
@@ -27,7 +27,7 @@
#include "monitor/hmp-target.h"
#include "monitor/hmp.h"
-void hmp_info_tlb(Monitor *mon, const QDict *qdict)
+void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict)
{
CPUArchState *env1 = mon_get_cpu_env(mon);
@@ -80,7 +80,7 @@ static target_long monitor_get_tbl(Monitor *mon, const struct MonitorDef *md,
return cpu_ppc_load_tbl(env);
}
-void hmp_info_tlb(Monitor *mon, const QDict *qdict)
+void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict)
{
CPUArchState *env1 = mon_get_cpu_env(mon);
@@ -208,7 +208,7 @@ static void mem_info_svxx(Monitor *mon, CPUArchState *env)
last_paddr + last_size - pbase, last_attr);
}
-void hmp_info_mem(Monitor *mon, const QDict *qdict)
+void hmp_info_mem_deprecated(Monitor *mon, const QDict *qdict)
{
CPUArchState *env;
@@ -39,7 +39,7 @@ static void print_tlb(Monitor *mon, int idx, tlb_t *tlb)
tlb->d, tlb->wt);
}
-void hmp_info_tlb(Monitor *mon, const QDict *qdict)
+void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict)
{
CPUArchState *env = mon_get_cpu_env(mon);
int i;
@@ -28,7 +28,7 @@
#include "monitor/hmp.h"
-void hmp_info_tlb(Monitor *mon, const QDict *qdict)
+void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict)
{
CPUArchState *env1 = mon_get_cpu_env(mon);
@@ -27,7 +27,7 @@
#include "monitor/hmp-target.h"
#include "monitor/hmp.h"
-void hmp_info_tlb(Monitor *mon, const QDict *qdict)
+void hmp_info_tlb_deprecated(Monitor *mon, const QDict *qdict)
{
CPUArchState *env1 = mon_get_cpu_env(mon);
@@ -228,14 +228,14 @@ ERST
.name = "tlb",
.args_type = "",
.params = "",
- .help = "show virtual to physical memory mappings",
+ .help = "deprecated synonym for 'info mmu -t'",
.cmd = hmp_info_tlb,
},
#endif
SRST
``info tlb``
- Show virtual to physical memory mappings.
+ This is a deprecated synonym for the mmu command.
ERST
#if defined(TARGET_I386) || defined(TARGET_RISCV)
@@ -243,14 +243,14 @@ ERST
.name = "mem",
.args_type = "",
.params = "",
- .help = "show the active virtual memory mappings",
+ .help = "deprecated synonym for 'info mmu -m'",
.cmd = hmp_info_mem,
},
#endif
SRST
``info mem``
- Show the active virtual memory mappings.
+ This is a deprecated synonym for the mmu command.
ERST
{
'info tlb' has been replaced by 'info mmu -t', and 'info mem' by 'info mmu -m'. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- docs/about/deprecated.rst | 10 ++++++++++ include/monitor/hmp-target.h | 2 ++ monitor/hmp-cmds-target.c | 20 ++++++++++++++++---- target/i386/monitor.c | 4 ++-- target/m68k/monitor.c | 2 +- target/nios2/monitor.c | 2 +- target/ppc/ppc-qmp-cmds.c | 2 +- target/riscv/monitor.c | 2 +- target/sh4/monitor.c | 2 +- target/sparc/monitor.c | 2 +- target/xtensa/monitor.c | 2 +- hmp-commands-info.hx | 8 ++++---- 12 files changed, 41 insertions(+), 17 deletions(-)