RFC accel: Only include qdev-realized vCPUs in global &cpus_queue
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest9 patches 13 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | accel/tcg: Simplify use of &first_cpu in rr_cpu_thread_fn()accel/ | +8 | 1 reply | |
| 2/9 | accel/tcg: Invalidate TB jump cache with global vCPU queue lockedaccel/ | +2 | 1 reply | |
| 3/9 | cpus: Remove cpu from global queue after UNREALIZE completedcpu-target.c | +2 | 1 reply | |
| 4/9 | hw/qdev: Introduce DeviceClass::[un]wire() handlershw/ include/ | +26 | 2 replies | |
| 5/9 | cpus: Add DeviceClass::[un]wire() stubshw/ | +10 | 1 reply | |
| 6/9 | cpus: Call hotplug handlers in DeviceWire()hw/ | +6 | 1 reply | |
| 7/9 | cpus: Only expose REALIZED vCPUs to global &cpus_queuecpu-common.c hw/ | +5 | 2 replies | |
| 8/9 | accel/kvm: Assert vCPU is created when calling kvm_dirty_ring_reap*()accel/ | +3 | 1 reply | |
| 9/9 | accel/kvm: Remove unreachable assertion in kvm_dirty_ring_reap*()accel/ | +0 | 1 reply |
Reviews trailers per patch
5 of 9 patches have a Reviewed-by or Acked-by.
| Patch | Richard Henderson |
|---|---|
| 1/9 | |
| 2/9 | |
| 3/9 | |
| 4/9 | |
| 5/9 | R-b |
| 6/9 | R-b |
| 7/9 | R-b |
| 8/9 | R-b |
| 9/9 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
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