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 <peter.maydell@linaro.org>
Acked-by: Dr. David Alan Gilbert <dave@treblig.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id:
20260417173105.
1648172-13-peter.maydell@linaro.org
Message-ID: <
20260430093810.
2762539-14-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
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);
}
}