diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2023-05-05 21:40:49 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2023-05-11 09:49:25 +0100 |
commit | 8c313254e61ed47a1bf4a2db714b25cdd94fbcce (patch) | |
tree | 89bcf31e2f0da1e5a94aec4d01d8ad3dfc64aaa9 | |
parent | a0f06a6226c463137acc5c187aef2c268f389282 (diff) | |
download | qemu-8c313254e61ed47a1bf4a2db714b25cdd94fbcce.zip qemu-8c313254e61ed47a1bf4a2db714b25cdd94fbcce.tar.gz qemu-8c313254e61ed47a1bf4a2db714b25cdd94fbcce.tar.bz2 |
accel/tcg: Fix atomic_mmu_lookup for reads
A copy-paste bug had us looking at the victim cache for writes.
Cc: qemu-stable@nongnu.org
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Fixes: 08dff435e2 ("tcg: Probe the proper permissions for atomic ops")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20230505204049.352469-1-richard.henderson@linaro.org>
-rw-r--r-- | accel/tcg/cputlb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 3117886..0b8a5f9 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1835,7 +1835,7 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr, } else /* if (prot & PAGE_READ) */ { tlb_addr = tlbe->addr_read; if (!tlb_hit(tlb_addr, addr)) { - if (!VICTIM_TLB_HIT(addr_write, addr)) { + if (!VICTIM_TLB_HIT(addr_read, addr)) { tlb_fill(env_cpu(env), addr, size, MMU_DATA_LOAD, mmu_idx, retaddr); index = tlb_index(env, mmu_idx, addr); |