qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] accel: Restrict TCG plugin (un)registration to TCG accel
@ 2024-05-28 14:59 Philippe Mathieu-Daudé
  2024-05-28 14:59 ` [PATCH 1/6] system/runstate: Remove unused 'qemu/plugin.h' header Philippe Mathieu-Daudé
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-05-28 14:59 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Pierrick Bouvier, Philippe Mathieu-Daudé,
	Paolo Bonzini, Richard Henderson

Hi,

TL;DR; this series remove TCG plugin code from generic accel code.

Since the introduction of the scoreboard in plugins, the INIT
hook use the vCPU index, which is only available somewhere
during the vCPU REALIZE() step (see below for call tree).

In order to clarify that, we split accel_cpu_common_[un]realize
as *unassigned and *assigned steps. This allow to remove the
plugin [un]registration code from common accel code.

Another approach suggested by rth is to add a PostRealize()
handler in DeviceClass. This was already experimented here:
https://lore.kernel.org/qemu-devel/20240209123226.32576-1-philmd@linaro.org/
Since it is a change harder to sell, I took this simplified
path which just make the vCPU REALIZE a bit more complex,
but not really an concern since the current call tree is
https://etherpad.opendev.org/p/QEMU_vCPU_life.

Philippe Mathieu-Daudé (6):
  system/runstate: Remove unused 'qemu/plugin.h' header
  accel/tcg: Move common declarations to 'internal-common.h'
  accel: Clarify accel_cpu_common_[un]realize() use unassigned vCPU
  accel: Introduce accel_cpu_common_[un]realize_assigned() handlers
  accel: Restrict TCG plugin (un)registration to TCG accel
  accel/tcg: Move qemu_plugin_vcpu_init__async() to plugins/

 accel/tcg/internal-common.h | 17 ++++++++++++++++
 accel/tcg/internal-target.h | 14 -------------
 include/qemu/accel.h        | 39 ++++++++++++++++++++++++++++++-------
 include/qemu/plugin.h       |  6 ------
 accel/accel-target.c        | 34 +++++++++++++++++++++++++++-----
 accel/tcg/cpu-exec-common.c | 20 +++++++++++++++++++
 accel/tcg/cpu-exec.c        |  4 ++--
 accel/tcg/tcg-all.c         |  8 +++++---
 cpu-target.c                | 10 ++++++++--
 hw/core/cpu-common.c        | 25 ------------------------
 plugins/core.c              |  8 +++++++-
 system/runstate.c           |  1 -
 12 files changed, 120 insertions(+), 66 deletions(-)

-- 
2.41.0



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-05-28 18:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-28 14:59 [PATCH 0/6] accel: Restrict TCG plugin (un)registration to TCG accel Philippe Mathieu-Daudé
2024-05-28 14:59 ` [PATCH 1/6] system/runstate: Remove unused 'qemu/plugin.h' header Philippe Mathieu-Daudé
2024-05-28 14:59 ` [PATCH 2/6] accel/tcg: Move common declarations to 'internal-common.h' Philippe Mathieu-Daudé
2024-05-28 14:59 ` [PATCH 3/6] accel: Clarify accel_cpu_common_[un]realize() use unassigned vCPU Philippe Mathieu-Daudé
2024-05-28 14:59 ` [PATCH 4/6] accel: Introduce accel_cpu_common_[un]realize_assigned() handlers Philippe Mathieu-Daudé
2024-05-28 14:59 ` [PATCH 5/6] accel: Restrict TCG plugin (un)registration to TCG accel Philippe Mathieu-Daudé
2024-05-28 14:59 ` [PATCH 6/6] accel/tcg: Move qemu_plugin_vcpu_init__async() to plugins/ Philippe Mathieu-Daudé
2024-05-28 18:15 ` [PATCH 0/6] accel: Restrict TCG plugin (un)registration to TCG accel Richard Henderson
2024-05-28 18:55 ` Pierrick Bouvier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).