qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] cpus: a few tweaks to CPU realization
@ 2024-05-30 19:42 Alex Bennée
  2024-05-30 19:42 ` [PATCH 1/5] hw/core: expand on the alignment of CPUState Alex Bennée
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Alex Bennée @ 2024-05-30 19:42 UTC (permalink / raw)
  To: qemu-devel
  Cc: Marcel Apfelbaum, Cameron Esfahani, Alexandre Iooss, Yanan Wang,
	Paolo Bonzini, Eduardo Habkost, Sunil Muthuswamy,
	Richard Henderson, Pierrick Bouvier, Philippe Mathieu-Daudé,
	Mahmoud Mandour, Reinoud Zandijk, Alex Bennée, kvm,
	Roman Bolshakov

The recent IPS plugin exposed a race condition between vcpu_init
callbacks and the other vcpu state callbacks. I originally thought
there was some wider re-factoring to be done to clean this up but it
turns out things are broadly where they should be. However some of the
stuff allocated in the vCPU threads can clearly be done earlier so
I've moved enough from cpu_common_realizefn to cpu_common_initfn to
allow plugins to queue work before the threads start solving the race.

Please review.

Alex Bennée (5):
  hw/core: expand on the alignment of CPUState
  cpu: move Qemu[Thread|Cond] setup into common code
  cpu-target: don't set cpu->thread_id to bogus value
  plugins: remove special casing for cpu->realized
  core/cpu-common: initialise plugin state before thread creation

 include/hw/core/cpu.h             | 18 ++++++++++++++----
 accel/dummy-cpus.c                |  3 ---
 accel/hvf/hvf-accel-ops.c         |  4 ----
 accel/kvm/kvm-accel-ops.c         |  3 ---
 accel/tcg/tcg-accel-ops-mttcg.c   |  4 ----
 accel/tcg/tcg-accel-ops-rr.c      | 14 +++++++-------
 cpu-target.c                      |  1 -
 hw/core/cpu-common.c              | 25 +++++++++++++++++--------
 plugins/core.c                    |  6 +-----
 target/i386/nvmm/nvmm-accel-ops.c |  3 ---
 target/i386/whpx/whpx-accel-ops.c |  3 ---
 11 files changed, 39 insertions(+), 45 deletions(-)

-- 
2.39.2



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

end of thread, other threads:[~2024-06-03 14:20 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-30 19:42 [PATCH 0/5] cpus: a few tweaks to CPU realization Alex Bennée
2024-05-30 19:42 ` [PATCH 1/5] hw/core: expand on the alignment of CPUState Alex Bennée
2024-05-30 22:28   ` Pierrick Bouvier
2024-06-03 11:32   ` Philippe Mathieu-Daudé
2024-05-30 19:42 ` [PATCH 2/5] cpu: move Qemu[Thread|Cond] setup into common code Alex Bennée
2024-05-30 22:29   ` Pierrick Bouvier
2024-05-31 13:46     ` Reinoud Zandijk
2024-06-03 11:28   ` Philippe Mathieu-Daudé
2024-05-30 19:42 ` [PATCH 3/5] cpu-target: don't set cpu->thread_id to bogus value Alex Bennée
2024-05-30 22:29   ` Pierrick Bouvier
2024-06-03 11:29   ` Philippe Mathieu-Daudé
2024-05-30 19:42 ` [PATCH 4/5] plugins: remove special casing for cpu->realized Alex Bennée
2024-05-30 22:30   ` Pierrick Bouvier
2024-06-03 11:31   ` Philippe Mathieu-Daudé
2024-06-03 14:11     ` Philippe Mathieu-Daudé
2024-06-03 14:19     ` Alex Bennée
2024-05-30 19:42 ` [PATCH 5/5] core/cpu-common: initialise plugin state before thread creation Alex Bennée
2024-05-30 22:31   ` Pierrick Bouvier
2024-05-31  8:59     ` Alex Bennée
2024-05-31  7:26   ` Philippe Mathieu-Daudé
2024-05-31  8:47     ` Alex Bennée
2024-06-03 14:10       ` Philippe Mathieu-Daudé
2024-06-03 12:47 ` [PATCH 0/5] cpus: a few tweaks to CPU realization Philippe Mathieu-Daudé
2024-06-03 14:11   ` Philippe Mathieu-Daudé

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).