Skip to contentSkip to conversation

accel/tcg: Remove dead mmap_unlock() call in invalidate_phys_page_range

PATCH In review Philippe Mathieu-Daudé 2 participants 2 messages Sep 24, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 accel/tcg: Remove dead mmap_unlock() call in invalidate_phys_page_range

Since commit a97d5d2c8be ("accel/tcg: Use interval tree for TBs in user-only mode") this code is guarded with #ifdef'ry and only build for system emulation where mmap_unlock() is meaningless. Remove the call.

---
 accel/tcg/tb-maint.c | 1 -
 1 file changed, 1 deletion(-)
accel/tcg/tb-maint.c +0 -1
index 0048316f99a..913dbea6d24 100644
@@ -1154,7 +1154,6 @@ tb_invalidate_phys_page_range__locked(CPUState *cpu,
         page_collection_unlock(pages);
         /* Force execution of one insn next time.  */
         cpu->cflags_next_tb = 1 | CF_NOIRQ | curr_cflags(cpu);
-        mmap_unlock();
         cpu_loop_exit_noexc(cpu);
     }
 }
Signature · 1 line
2.51.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Philippe Mathieu-Daudé

Since commit a97d5d2c8be ("accel/tcg: Use interval tree for TBs in user-only mode") this code is guarded with #ifdef'ry and only build for system emulation where mmap_unlock() is meaningless. Remove the call.

---
  accel/tcg/tb-maint.c | 1 -
  1 file changed, 1 deletion(-)

And queued.

r~

Quoted 13 lines
accel/tcg/tb-maint.c +0 -1
index 0048316f99a..913dbea6d24 100644
@@ -1154,7 +1154,6 @@ tb_invalidate_phys_page_range__locked(CPUState *cpu,
          page_collection_unlock(pages);
          /* Force execution of one insn next time.  */
          cpu->cflags_next_tb = 1 | CF_NOIRQ | curr_cflags(cpu);
-        mmap_unlock();
          cpu_loop_exit_noexc(cpu);
      }
  }