]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
cputlb: Fix tlb_vaddr_to_host
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 4 Sep 2019 00:03:12 +0000 (17:03 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 28 Oct 2019 09:35:23 +0000 (10:35 +0100)
Using uintptr_t instead of target_ulong meant that, for 64-bit guest
and 32-bit host, we truncated the guest address comparator and so may
not hit the tlb when we should.

Fixes: 4811e9095c0
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/cputlb.c

index 6f4194df96f76a636ae8f49e3473b673f20f163c..5eebddcca80cc0d2900c1cf7ddc4282d03cd6913 100644 (file)
@@ -1189,7 +1189,7 @@ void *tlb_vaddr_to_host(CPUArchState *env, abi_ptr addr,
                         MMUAccessType access_type, int mmu_idx)
 {
     CPUTLBEntry *entry = tlb_entry(env, mmu_idx, addr);
-    uintptr_t tlb_addr, page;
+    target_ulong tlb_addr, page;
     size_t elt_ofs;
 
     switch (access_type) {