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)
Signed-off-by: Michael Tokarev <[email protected]>

diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index 0fc8e42dfee..386ea2b4e10 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -1588,7 +1588,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 = full->section;
         data->is_io = true;
         data->mr = section->mr;
-- 
2.47.3


Reply via email to