]> git.proxmox.com Git - mirror_qemu.git/commit - cpu-target.c
accel/tcg: Complete cpu initialization before registration
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 31 Oct 2022 02:26:36 +0000 (13:26 +1100)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 31 Oct 2022 21:31:41 +0000 (08:31 +1100)
commit4e4fa6c12d97ee3ee87623c153009a5abd7b428e
tree41554ff61d55922864d39fdc147d0f61238fbee1
parent631793308679cf0436cd7145a9ff318331c982c9
accel/tcg: Complete cpu initialization before registration

Delay cpu_list_add until realize is complete, so that cross-cpu
interaction does not happen with incomplete cpu state.  For this,
we must delay plugin initialization out of tcg_exec_realizefn,
because no cpu_index has been assigned.

Fixes a problem with cross-cpu jump cache flushing, when the
jump cache has not yet been allocated.

Fixes: a976a99a2975 ("include/hw/core: Create struct CPUJumpCache")
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reported-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/cpu-exec.c
accel/tcg/translate-all.c
cpu.c