From: Peter Maydell <[email protected]> In hmp_gva2gpa() we currently have a workaround for not all implementations of get_phys_addr_debug handling non-page-aligned addresses: we round the input address from the user down to the target page boundary before the call and then add the page offset back to the returned value.
Now that we guarantee that all implementations will return the correct exact physaddr for a virtual address, we can drop this handling. Signed-off-by: Peter Maydell <[email protected]> Acked-by: Dr. David Alan Gilbert <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-id: [email protected] Message-ID: <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- monitor/hmp-cmds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index b37a9985c0d..88f9788bd9c 100644 --- a/monitor/hmp-cmds.c +++ b/monitor/hmp-cmds.c @@ -771,12 +771,11 @@ void hmp_gva2gpa(Monitor *mon, const QDict *qdict) return; } - gpa = cpu_get_phys_addr_debug(cs, addr & TARGET_PAGE_MASK); + gpa = cpu_get_phys_addr_debug(cs, addr); if (gpa == -1) { monitor_printf(mon, "Unmapped\n"); } else { - monitor_printf(mon, "gpa: 0x%" HWADDR_PRIx "\n", - gpa + (addr & ~TARGET_PAGE_MASK)); + monitor_printf(mon, "gpa: 0x%" HWADDR_PRIx "\n", gpa); } } -- 2.53.0
