qemu-e2k/accel/tcg
Greg Kurz f1023d21e8 spapr: Unrealize vCPUs with qdev_unrealize()
Since we introduced CPU hot-unplug in sPAPR, we don't unrealize the
vCPU objects explicitly. Instead, we let QOM handle that for us under
object_property_del_all() when the CPU core object is finalized. The
only thing we do is calling cpu_remove_sync() to tear the vCPU thread
down.

This happens to work but it is ugly because:
- we call qdev_realize() but the corresponding qdev_unrealize() is
  buried deep in the QOM code
- we call cpu_remove_sync() to undo qemu_init_vcpu() called by
  ppc_cpu_realize() in target/ppc/translate_init.c.inc
- the CPU init and teardown paths aren't really symmetrical

The latter didn't bite us so far but a future patch that greatly
simplifies the CPU core realize path needs it to avoid a crash
in QOM.

For all these reasons, have ppc_cpu_unrealize() to undo the changes
of ppc_cpu_realize() by calling cpu_remove_sync() at the right place,
and have the sPAPR CPU core code to call qdev_unrealize().

This requires to add a missing stub because translate_init.c.inc is
also compiled for user mode.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <160279671236.1808373.14732005038172874990.stgit@bahia.lan>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2020-10-28 01:08:53 +11:00
..
atomic_common.c.inc meson: rename included C source files to .c.inc 2020-08-21 06:18:30 -04:00
atomic_template.h qemu/atomic.h: rename atomic_ to qatomic_ 2020-09-23 16:07:44 +01:00
cpu-exec-common.c qemu-common: Move tcg_enabled() etc. to sysemu/tcg.h 2019-06-11 20:22:09 +02:00
cpu-exec.c replay: don't record interrupt poll 2020-10-06 08:34:49 +02:00
cputlb.c accel/tcg: Add tlb_flush_page_bits_by_mmuidx* 2020-10-20 16:12:00 +01:00
meson.build cpus: extract out TCG-specific code to accel/tcg 2020-10-05 16:41:22 +02:00
plugin-gen.c plugin-gen: add module for TCG-related code 2019-10-28 15:12:38 +00:00
plugin-helpers.h plugin-gen: add module for TCG-related code 2019-10-28 15:12:38 +00:00
tcg-all.c cpus: add handle_interrupt to the CpusAccel interface 2020-10-05 16:41:22 +02:00
tcg-cpus.c accel/tcg: use current_machine as it is always set for softmmu 2020-10-05 16:41:22 +02:00
tcg-cpus.h cpus: extract out TCG-specific code to accel/tcg 2020-10-05 16:41:22 +02:00
tcg-runtime-gvec.c tcg: Implement gvec support for rotate by vector 2020-06-02 08:42:37 -07:00
tcg-runtime.c tcg: Search includes from the project root source directory 2020-01-15 15:13:10 -10:00
tcg-runtime.h tcg: Implement gvec support for rotate by vector 2020-06-02 08:42:37 -07:00
trace-events accel/tcg: don't disable exec_tb trace events 2020-05-15 15:25:16 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
translate-all.c cpu-timers, icount: new modules 2020-10-05 16:41:22 +02:00
translate-all.h cputlb: Pass retaddr to tb_check_watchpoint 2019-09-25 10:56:28 -07:00
translator.c gdbstub: add reverse step support in replay mode 2020-10-06 08:34:49 +02:00
user-exec-stub.c spapr: Unrealize vCPUs with qdev_unrealize() 2020-10-28 01:08:53 +11:00
user-exec.c accel/tcg: Fix computing of is_write for MIPS 2020-10-08 05:57:32 -05:00