plugins/api.c: Use cpu_translate_for_debug()
We want to remove the cpu_get_phys_addr_debug() function; update the plugin code to use cpu_translate_for_debug() instead. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20260430093810.2762539-25-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Peter Maydell committed
Apr 30, 2026 at 10:38 UTC
db28f0efddfb7a9b7a7ead51c30b7245446c8ced
1 file changed
+4
-4
plugins/api.c
+4
-4
@@ -617,15 +617,15 @@ qemu_plugin_write_memory_hwaddr(hwaddr addr, GByteArray *data)
617
bool qemu_plugin_translate_vaddr(uint64_t vaddr, uint64_t *hwaddr)
618
{
619
#ifdef CONFIG_SOFTMMU
620
- g_assert(current_cpu);
620
+ TranslateForDebugResult tres;
621
622
- uint64_t res = cpu_get_phys_addr_debug(current_cpu, vaddr);
622
+ g_assert(current_cpu);
623
624
- if (res == (uint64_t)-1) {
624
+ if (!cpu_translate_for_debug(current_cpu, vaddr, &tres)) {
625
return false;
626
}
627
628
- *hwaddr = res;
628
+ *hwaddr = tres.physaddr;
629
630
return true;
631
#else