On 4/7/25 07:36, Xiaoyao Li wrote:
On 7/4/2025 1:32 AM, Philippe Mathieu-Daudé wrote:
AccelOpsClass is for methods dealing with vCPUs.
When only dealing with AccelState, AccelClass is sufficient.
Move cpus_are_resettable() declaration to accel/accel-system.c.
I don't think this is necessary unless a solid justfication provided.
One straightfroward question against it, is why don't move
gdb_supports_guest_debug() to accel/accel-system.c as well in the patch 12.
gdb_supports_guest_debug() is used in both user / system emulation.
In order to have AccelClass methods instrospect their state,
we need to pass AccelState by argument.
Is this the essential preparation for split-accel work?
Yes, but also the aim is to better organize and clarify the APIs.
We have a set of generic handlers that work on the AccelState context,
regardless of vCPUs; and another set which works on vCPUs within Accel
and must get the vCPU context by argument.
Adapt KVM handler.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
---
include/qemu/accel.h | 1 +
include/system/accel-ops.h | 1 -
accel/accel-system.c | 10 ++++++++++
accel/kvm/kvm-accel-ops.c | 6 ------
accel/kvm/kvm-all.c | 6 ++++++
system/cpus.c | 8 --------
6 files changed, 17 insertions(+), 15 deletions(-)