From: Anton Blanchard <[email protected]>

Update tlb_plugin_lookup() to check TLB_MMIO in slow_flags.

Cc: [email protected]
Fixes: 24b5e0fdb543 ("include/exec: Move TLB_MMIO, TLB_DISCARD_WRITE to slow 
flags")
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Anton Blanchard <[email protected]>
Message-ID: <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
(cherry picked from commit f371388029c9b2afb9c94a2333fa314e8499d409)
(Mjt: context fixup for 10.0.x)
Signed-off-by: Michael Tokarev <[email protected]>

diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 6ebd1007dd9..b0d0a07c961 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -1583,7 +1583,7 @@ bool tlb_plugin_lookup(CPUState *cpu, vaddr addr, int 
mmu_idx,
     data->phys_addr = full->phys_addr | (addr & ~TARGET_PAGE_MASK);
 
     /* We must have an iotlb entry for MMIO */
-    if (tlb_addr & TLB_MMIO) {
+    if (full->slow_flags[access_type] & TLB_MMIO) {
         MemoryRegionSection *section =
             iotlb_to_section(cpu, full->xlat_section & ~TARGET_PAGE_MASK,
                              full->attrs);
-- 
2.47.3


Reply via email to