From b64bb17d14a62ea04b605f81daec8a5a4fad3be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Thu, 12 Jun 2025 14:45:19 +0200 Subject: accel: Expose and register generic_handle_interrupt() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In order to dispatch over AccelOpsClass::handle_interrupt(), we need it always defined, not calling a hidden handler under the hood. Make AccelOpsClass::handle_interrupt() mandatory. Expose generic_handle_interrupt() prototype and register it for each accelerator. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier Reviewed-by: Zhao Liu Reviewed-by: Richard Henderson Reviewed-by: Xiaoyao Li Reviewed-by: Mads Ynddal Message-Id: <20250703173248.44995-29-philmd@linaro.org> --- include/system/accel-ops.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/system/accel-ops.h b/include/system/accel-ops.h index a4e706b..e775ecc 100644 --- a/include/system/accel-ops.h +++ b/include/system/accel-ops.h @@ -62,6 +62,7 @@ struct AccelOpsClass { void (*synchronize_pre_loadvm)(CPUState *cpu); void (*synchronize_pre_resume)(bool step_pending); + /* handle_interrupt is mandatory. */ void (*handle_interrupt)(CPUState *cpu, int mask); /** @@ -86,4 +87,6 @@ struct AccelOpsClass { void (*remove_all_breakpoints)(CPUState *cpu); }; +void generic_handle_interrupt(CPUState *cpu, int mask); + #endif /* ACCEL_OPS_H */ -- cgit v1.1