summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorAlex Bennée2021-07-09 16:29:52 +0200
committerAlex Bennée2021-07-14 15:33:53 +0200
commit2d932039980ab78b39030a7a80ad5eb7a93c894f (patch)
treed6f19917d2a2687fe398c87f54c50089359c0684 /plugins
parenttests/tcg: make test-mmap a little less aggressive (diff)
downloadqemu-2d932039980ab78b39030a7a80ad5eb7a93c894f.tar.gz
qemu-2d932039980ab78b39030a7a80ad5eb7a93c894f.tar.xz
qemu-2d932039980ab78b39030a7a80ad5eb7a93c894f.zip
plugins: fix-up handling of internal hostaddr for 32 bit
The compiler rightly complains when we build on 32 bit that casting uint64_t into a void is a bad idea. We are really dealing with a host pointer at this point so treat it as such. This does involve a uintptr_t cast of the result of the TLB addend as we know that has to point to the host memory. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210709143005.1554-28-alex.bennee@linaro.org>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/api.c b/plugins/api.c
index 332e2c60e2..78b563c5c5 100644
--- a/plugins/api.c
+++ b/plugins/api.c
@@ -308,11 +308,11 @@ uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *haddr)
if (!haddr->is_io) {
RAMBlock *block;
ram_addr_t offset;
- void *hostaddr = (void *) haddr->v.ram.hostaddr;
+ void *hostaddr = haddr->v.ram.hostaddr;
block = qemu_ram_block_from_host(hostaddr, false, &offset);
if (!block) {
- error_report("Bad ram pointer %"PRIx64"", haddr->v.ram.hostaddr);
+ error_report("Bad host ram pointer %p", haddr->v.ram.hostaddr);
abort();
}