mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
monitor/hmp-cmds: Use cpu_translate_for_debug()
We want to remove the cpu_get_phys_addr_debug() function; update the HMP gva2gpa command implementation to use cpu_translate_for_debug() instead. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20260430093810.2762539-24-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
committed by
Philippe Mathieu-Daudé
parent
a0c9fc28bc
commit
a4c857aef0
@@ -764,18 +764,17 @@ void hmp_gva2gpa(Monitor *mon, const QDict *qdict)
|
||||
{
|
||||
vaddr addr = qdict_get_int(qdict, "addr");
|
||||
CPUState *cs = mon_get_cpu(mon);
|
||||
hwaddr gpa;
|
||||
TranslateForDebugResult tres;
|
||||
|
||||
if (!cs) {
|
||||
monitor_printf(mon, "No cpu\n");
|
||||
return;
|
||||
}
|
||||
|
||||
gpa = cpu_get_phys_addr_debug(cs, addr);
|
||||
if (gpa == -1) {
|
||||
if (!cpu_translate_for_debug(cs, addr, &tres)) {
|
||||
monitor_printf(mon, "Unmapped\n");
|
||||
} else {
|
||||
monitor_printf(mon, "gpa: 0x%" HWADDR_PRIx "\n", gpa);
|
||||
monitor_printf(mon, "gpa: 0x%" HWADDR_PRIx "\n", tres.physaddr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user