]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
plugins/api.c: Trust cpu_get_phys_addr_debug() return address
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 30 Apr 2026 09:37:59 +0000 (10:37 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 12 May 2026 20:35:54 +0000 (22:35 +0200)
In qemu_plugin_translate_vaddr() we have a workaround for not all
implementations of get_phys_addr_debug returning an exact physaddr
for the input virtual address: we OR back in the page offset to the
return value.

Now that we guarantee that get_phys_addr_debug returns the exact
physaddr for the input virtual address, we can drop this workaround.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20260417173105.1648172-14-peter.maydell@linaro.org
Message-ID: <20260430093810.2762539-15-peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
plugins/api.c

index 4b6fad499988d9a8de71cae72c2046f141fea0e3..c97cc68882544144d3a1335f3191fa4bda10b3f0 100644 (file)
@@ -625,7 +625,7 @@ bool qemu_plugin_translate_vaddr(uint64_t vaddr, uint64_t *hwaddr)
         return false;
     }
 
-    *hwaddr = res | (vaddr & ~TARGET_PAGE_MASK);
+    *hwaddr = res;
 
     return true;
 #else