qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/7] accel: Add per-accelerator vCPUs queue
@ 2025-01-06 20:02 Philippe Mathieu-Daudé
  2025-01-06 20:02 ` [RFC PATCH 1/7] cpus: Restrict CPU_FOREACH_SAFE() to user emulation Philippe Mathieu-Daudé
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-01-06 20:02 UTC (permalink / raw)
  To: qemu-devel
  Cc: Daniel Henrique Barboza, Frédéric Barrat,
	Stefano Stabellini, Ilya Leoshkevich, Cameron Esfahani,
	Paolo Bonzini, kvm, Alexander Graf, Paul Durrant,
	David Hildenbrand, Halil Pasic, Philippe Mathieu-Daudé,
	Marcel Apfelbaum, xen-devel, qemu-arm, Cédric Le Goater,
	Yanan Wang, Reinoud Zandijk, Peter Maydell, qemu-s390x,
	Riku Voipio, Anthony PERARD, Alistair Francis, Sunil Muthuswamy,
	Christian Borntraeger, Nicholas Piggin, Richard Henderson,
	Marcelo Tosatti, Thomas Huth, Roman Bolshakov, Edgar E . Iglesias,
	Zhao Liu, Phil Dennis-Jordan, David Woodhouse, Harsh Prateek Bora,
	Nina Schoetterl-Glausch, Edgar E. Iglesias, Eduardo Habkost,
	qemu-ppc, Daniel Henrique Barboza, Michael S. Tsirkin,
	Anton Johansson

Hi,

Currently we register all vCPUs to the global 'cpus_queue' queue,
however we can not discriminate per accelerator or per target
architecture (which might happen in a soon future).

This series tries to add an accelerator discriminator, so
accelerator specific code can iterate on its own vCPUs. This
is required to run a pair of HW + SW accelerators like the
(HVF, TCG) or (KVM, TCG) combinations. Otherwise, i.e. the
HVF core code could iterate on TCG vCPUs...
To keep it simple and not refactor heavily the code base,
we introduce the CPU_FOREACH_TCG/HVF/KVM() macros, only
defined for each accelerator.

This is just a RFC to get some thoughts whether this is
heading in the correct direction or not ;)

Regards,

Phil.

Philippe Mathieu-Daudé (7):
  cpus: Restrict CPU_FOREACH_SAFE() to user emulation
  cpus: Introduce AccelOpsClass::get_cpus_queue()
  accel/tcg: Implement tcg_get_cpus_queue()
  accel/tcg: Use CPU_FOREACH_TCG()
  accel/hw: Implement hw_accel_get_cpus_queue()
  accel/hvf: Use CPU_FOREACH_HVF()
  accel/kvm: Use CPU_FOREACH_KVM()

 accel/tcg/tcg-accel-ops.h         | 10 ++++++++++
 include/hw/core/cpu.h             | 11 +++++++++++
 include/system/accel-ops.h        |  6 ++++++
 include/system/hvf_int.h          |  4 ++++
 include/system/hw_accel.h         |  9 +++++++++
 include/system/kvm_int.h          |  3 +++
 accel/accel-system.c              |  8 ++++++++
 accel/hvf/hvf-accel-ops.c         |  9 +++++----
 accel/kvm/kvm-accel-ops.c         |  1 +
 accel/kvm/kvm-all.c               | 14 +++++++-------
 accel/tcg/cputlb.c                |  7 ++++---
 accel/tcg/monitor.c               |  3 ++-
 accel/tcg/tb-maint.c              |  7 ++++---
 accel/tcg/tcg-accel-ops-rr.c      | 10 +++++-----
 accel/tcg/tcg-accel-ops.c         | 16 ++++++++++++----
 accel/tcg/user-exec-stub.c        |  5 +++++
 accel/xen/xen-all.c               |  1 +
 cpu-common.c                      | 10 ++++++++++
 hw/i386/kvm/clock.c               |  3 ++-
 hw/intc/spapr_xive_kvm.c          |  5 +++--
 hw/intc/xics_kvm.c                |  5 +++--
 system/cpus.c                     |  5 +++++
 target/arm/hvf/hvf.c              |  4 ++--
 target/i386/kvm/kvm.c             |  4 ++--
 target/i386/kvm/xen-emu.c         |  2 +-
 target/i386/nvmm/nvmm-accel-ops.c |  1 +
 target/i386/whpx/whpx-accel-ops.c |  1 +
 target/s390x/kvm/kvm.c            |  2 +-
 target/s390x/kvm/stsi-topology.c  |  3 ++-
 29 files changed, 130 insertions(+), 39 deletions(-)

-- 
2.47.1



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

end of thread, other threads:[~2025-09-02 13:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06 20:02 [RFC PATCH 0/7] accel: Add per-accelerator vCPUs queue Philippe Mathieu-Daudé
2025-01-06 20:02 ` [RFC PATCH 1/7] cpus: Restrict CPU_FOREACH_SAFE() to user emulation Philippe Mathieu-Daudé
2025-01-06 20:19   ` Daniel Henrique Barboza
2025-01-06 20:02 ` [RFC PATCH 2/7] cpus: Introduce AccelOpsClass::get_cpus_queue() Philippe Mathieu-Daudé
2025-01-06 20:02 ` [RFC PATCH 3/7] accel/tcg: Implement tcg_get_cpus_queue() Philippe Mathieu-Daudé
2025-01-06 20:02 ` [RFC PATCH 4/7] accel/tcg: Use CPU_FOREACH_TCG() Philippe Mathieu-Daudé
2025-01-06 20:02 ` [RFC PATCH 5/7] accel/hw: Implement hw_accel_get_cpus_queue() Philippe Mathieu-Daudé
2025-01-06 20:02 ` [RFC PATCH 6/7] accel/hvf: Use CPU_FOREACH_HVF() Philippe Mathieu-Daudé
2025-01-06 20:33   ` Daniel Henrique Barboza
2025-01-06 21:08     ` Philippe Mathieu-Daudé
2025-01-07 13:09       ` BALATON Zoltan
2025-01-06 20:02 ` [RFC PATCH 7/7] accel/kvm: Use CPU_FOREACH_KVM() Philippe Mathieu-Daudé
2025-09-02 13:25 ` [RFC PATCH 0/7] accel: Add per-accelerator vCPUs queue 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).