From 9a8e6b9ca1a6cf5aa66f0f7f9620a0b90320b064 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Mon, 23 Jun 2025 17:58:39 +0200 Subject: accel/system: Convert pre_resume() from AccelOpsClass to AccelClass MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Reviewed-by: Richard Henderson Message-Id: <20250702185332.43650-21-philmd@linaro.org> --- accel/accel-system.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'accel/accel-system.c') diff --git a/accel/accel-system.c b/accel/accel-system.c index af713cc902..c54c30f18b 100644 --- a/accel/accel-system.c +++ b/accel/accel-system.c @@ -62,6 +62,15 @@ void accel_setup_post(MachineState *ms) } } +void accel_pre_resume(MachineState *ms, bool step_pending) +{ + AccelState *accel = ms->accelerator; + AccelClass *acc = ACCEL_GET_CLASS(accel); + if (acc->pre_resume_vm) { + acc->pre_resume_vm(accel, step_pending); + } +} + /* initialize the arch-independent accel operation interfaces */ void accel_init_ops_interfaces(AccelClass *ac) { -- cgit 1.4.1