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

Philippe Mathieu-Daudé posted 1 patch 3 days, 22 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250924164824.51971-1-philmd@linaro.org
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>
accel/tcg/tb-maint.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] accel/tcg: Remove dead mmap_unlock() call in invalidate_phys_page_range
Posted by Philippe Mathieu-Daudé 3 days, 22 hours ago
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.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/tcg/tb-maint.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c
index 0048316f99a..913dbea6d24 100644
--- a/accel/tcg/tb-maint.c
+++ b/accel/tcg/tb-maint.c
@@ -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);
     }
 }
-- 
2.51.0


Re: [PATCH] accel/tcg: Remove dead mmap_unlock() call in invalidate_phys_page_range
Posted by Richard Henderson 3 days, 21 hours ago
On 9/24/25 09:48, Philippe Mathieu-Daudé wrote:
> 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.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   accel/tcg/tb-maint.c | 1 -
>   1 file changed, 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

And queued.

r~

> 
> diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c
> index 0048316f99a..913dbea6d24 100644
> --- a/accel/tcg/tb-maint.c
> +++ b/accel/tcg/tb-maint.c
> @@ -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);
>       }
>   }