]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
plugins/api.c: Use cpu_translate_for_debug()
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 30 Apr 2026 09:38:09 +0000 (10:38 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 12 May 2026 20:35:54 +0000 (22:35 +0200)
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>
plugins/api.c

index c97cc68882544144d3a1335f3191fa4bda10b3f0..2d5fe9327f7afedc44b8d0318886f7d525d7042f 100644 (file)
@@ -617,15 +617,15 @@ qemu_plugin_write_memory_hwaddr(hwaddr addr, GByteArray *data)
 bool qemu_plugin_translate_vaddr(uint64_t vaddr, uint64_t *hwaddr)
 {
 #ifdef CONFIG_SOFTMMU
-    g_assert(current_cpu);
+    TranslateForDebugResult tres;
 
-    uint64_t res = cpu_get_phys_addr_debug(current_cpu, vaddr);
+    g_assert(current_cpu);
 
-    if (res == (uint64_t)-1) {
+    if (!cpu_translate_for_debug(current_cpu, vaddr, &tres)) {
         return false;
     }
 
-    *hwaddr = res;
+    *hwaddr = tres.physaddr;
 
     return true;
 #else