diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2026-04-30 10:38:09 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2026-05-12 22:35:54 +0200 |
| commit | db28f0efddfb7a9b7a7ead51c30b7245446c8ced (patch) | |
| tree | 3cdf8541ffad4024f4ae44a276ea1a3f4d4f6acf /plugins | |
| parent | a4c857aef058fa7ccee50ea8d01bd78302ce032a (diff) | |
| download | qemu-db28f0efddfb7a9b7a7ead51c30b7245446c8ced.tar.gz qemu-db28f0efddfb7a9b7a7ead51c30b7245446c8ced.zip | |
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>
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/api.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/api.c b/plugins/api.c index c97cc68882..2d5fe9327f 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -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 |
