]> git.ipfire.org Git - thirdparty/qemu.git/commit
softmmu: Use async_run_on_cpu in tcg_commit
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 25 Aug 2023 23:13:17 +0000 (16:13 -0700)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 2 Oct 2023 23:00:54 +0000 (02:00 +0300)
commitd9ec18a0fc058dd3c421524fb284bcd76b8b9f5f
treeab73b99712537f150066965b131261c26c784476
parent4ade907b3026990e58b221fa931762812e21362a
softmmu: Use async_run_on_cpu in tcg_commit

After system startup, run the update to memory_dispatch
and the tlb_flush on the cpu.  This eliminates a race,
wherein a running cpu sees the memory_dispatch change
but has not yet seen the tlb_flush.

Since the update now happens on the cpu, we need not use
qatomic_rcu_read to protect the read of memory_dispatch.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1826
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1834
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1846
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit 0d58c660689f6da1e3feff8a997014003d928b3b)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
accel/tcg/cpu-exec-common.c
include/exec/cpu-common.h
softmmu/physmem.c