Skip to content

RFC accel: Only include qdev-realized vCPUs in global &cpus_queue

Philippe Mathieu-Daudé kvm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest9 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9accel/tcg: Simplify use of &first_cpu in rr_cpu_thread_fn()accel/tcg/tcg-accel-ops-rr.c+8 -71 reply
2/9accel/tcg: Invalidate TB jump cache with global vCPU queue lockedaccel/tcg/tb-maint.c+2 -01 reply
3/9cpus: Remove cpu from global queue after UNREALIZE completedcpu-target.c+2 -51 reply
4/9hw/qdev: Introduce DeviceClass::[un]wire() handlershw/core/qdev.c include/hw/qdev-core.h+26 -12 replies
5/9cpus: Add DeviceClass::[un]wire() stubshw/core/cpu-common.c+10 -01 reply
6/9cpus: Call hotplug handlers in DeviceWire()hw/core/cpu-common.c+6 -51 reply
7/9cpus: Only expose REALIZED vCPUs to global &cpus_queuecpu-common.c hw/core/cpu-common.c+5 -22 replies
8/9accel/kvm: Assert vCPU is created when calling kvm_dirty_ring_reap*()accel/kvm/kvm-all.c+3 -51 reply
9/9accel/kvm: Remove unreachable assertion in kvm_dirty_ring_reap*()accel/kvm/kvm-all.c+0 -71 reply

Reviews trailers per patch

5 of 9 patches have a Reviewed-by or Acked-by.

PatchRichard Henderson
1/9
2/9
3/9
4/9
5/9R-b
6/9R-b
7/9R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/9] accel: Only include qdev-realized vCPUs in global &cpus_queue

Hi,

The goal of this series is to expose vCPUs in a stable state to the accelerators, in particular the QDev 'REALIZED' step.

To do so we split the QTAILQ_INSERT/REMOVE calls from cpu_list_add() / cpu_list_remove(), by moving them to the DeviceClass::[un]wire() handlers, guaranty to be called just before a vCPU is exposed to the guest, as "realized".

First we have to modify how &first_cpu is used in TCG round robin implementation, and ensure we invalidate the TB jmpcache with &qemu_cpu_list locked.

I'm really out of my comfort zone here, so posting as RFC. At least all test suite is passing...

I expect these changes to allow CPUState::cpu_index clarifications and simplifications, but this will be addressed (and commented) in a separate series.

Regards,

Phil.

Philippe Mathieu-Daudé (9):
accel/tcg: Simplify use of &first_cpu in rr_cpu_thread_fn() accel/tcg: Invalidate TB jump cache with global vCPU queue locked
cpus: Remove cpu from global queue after UNREALIZE completed hw/qdev: Introduce DeviceClass::[un]wire() handlers
cpus: Add DeviceClass::[un]wire() stubs
cpus: Call hotplug handlers in DeviceWire()
cpus: Only expose REALIZED vCPUs to global &cpus_queue accel/kvm: Assert vCPU is created when calling kvm_dirty_ring_reap*() accel/kvm: Remove unreachable assertion in kvm_dirty_ring_reap*()

 include/hw/qdev-core.h       |  7 +++++++
 accel/kvm/kvm-all.c          |  9 ---------
 accel/tcg/tb-maint.c         |  2 ++
 accel/tcg/tcg-accel-ops-rr.c | 15 ++++++++-------
 cpu-common.c                 |  2 --
 cpu-target.c                 |  7 ++-----
 hw/core/cpu-common.c         | 18 +++++++++++++++++-
 hw/core/qdev.c               | 20 +++++++++++++++++++-
 8 files changed, 55 insertions(+), 25 deletions(-)
Signature · 1 line
2.47.1