aboutsummaryrefslogtreecommitdiff
path: root/accel
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2021-07-09 15:29:52 +0100
committerAlex Bennée <alex.bennee@linaro.org>2021-07-14 14:33:53 +0100
commit2d932039980ab78b39030a7a80ad5eb7a93c894f (patch)
treed6f19917d2a2687fe398c87f54c50089359c0684 /accel
parente2bcd3ad093a6bd4a045d5b5d22f0b92243d0da3 (diff)
downloadqemu-2d932039980ab78b39030a7a80ad5eb7a93c894f.zip
qemu-2d932039980ab78b39030a7a80ad5eb7a93c894f.tar.gz
qemu-2d932039980ab78b39030a7a80ad5eb7a93c894f.tar.bz2
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 'accel')
-rw-r--r--accel/tcg/cputlb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index b6d5fc6..b4e15b6 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -1728,7 +1728,7 @@ bool tlb_plugin_lookup(CPUState *cpu, target_ulong addr, int mmu_idx,
data->v.io.offset = (iotlbentry->addr & TARGET_PAGE_MASK) + addr;
} else {
data->is_io = false;
- data->v.ram.hostaddr = addr + tlbe->addend;
+ data->v.ram.hostaddr = (void *)((uintptr_t)addr + tlbe->addend);
}
return true;
} else {