summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-06-23 17:58:39 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-07-04 15:37:07 +0200
commit9a8e6b9ca1a6cf5aa66f0f7f9620a0b90320b064 (patch)
tree3a4d324b1528469563916b54389504a6ea66a686 /include
parent261573c7724ffca8795416eae8b435e175672491 (diff)
downloadfocaccia-qemu-9a8e6b9ca1a6cf5aa66f0f7f9620a0b90320b064.tar.gz
focaccia-qemu-9a8e6b9ca1a6cf5aa66f0f7f9620a0b90320b064.zip
accel/system: Convert pre_resume() from AccelOpsClass to AccelClass
Accelerators call pre_resume() once. Since it isn't a method to
call for each vCPU, move it from AccelOpsClass to AccelClass.
Adapt WHPX.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20250702185332.43650-21-philmd@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/accel.h3
-rw-r--r--include/system/accel-ops.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/include/qemu/accel.h b/include/qemu/accel.h
index 1c097ac4df..9e821d0fae 100644
--- a/include/qemu/accel.h
+++ b/include/qemu/accel.h
@@ -46,6 +46,7 @@ typedef struct AccelClass {
 
     /* system related hooks */
     void (*setup_post)(AccelState *as);
+    void (*pre_resume_vm)(AccelState *as, bool step_pending);
     bool (*has_memory)(AccelState *accel, AddressSpace *as,
                        hwaddr start_addr, hwaddr size);
 
@@ -86,6 +87,8 @@ int accel_init_machine(AccelState *accel, MachineState *ms);
 /* Called just before os_setup_post (ie just before drop OS privs) */
 void accel_setup_post(MachineState *ms);
 
+void accel_pre_resume(MachineState *ms, bool step_pending);
+
 /**
  * accel_cpu_instance_init:
  * @cpu: The CPU that needs to do accel-specific object initializations.
diff --git a/include/system/accel-ops.h b/include/system/accel-ops.h
index a786c7d478..bf7383511d 100644
--- a/include/system/accel-ops.h
+++ b/include/system/accel-ops.h
@@ -61,7 +61,6 @@ struct AccelOpsClass {
      */
     void (*synchronize_state)(CPUState *cpu);
     void (*synchronize_pre_loadvm)(CPUState *cpu);
-    void (*synchronize_pre_resume)(bool step_pending);
 
     /* handle_interrupt is mandatory. */
     void (*handle_interrupt)(CPUState *cpu, int mask);