diff mbox series

[RFC,RESEND,24/42] accel/split: Implement handle_interrupt()

Message ID 20250620172751.94231-25-philmd@linaro.org
State New
Headers show
Series accel/split/arm: Run EL2 using TCG and EL1/EL0 in hardware with HVF | expand

Commit Message

Philippe Mathieu-Daudé June 20, 2025, 5:27 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/split/split-accel-ops.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Richard Henderson June 22, 2025, 3:04 a.m. UTC | #1
On 6/20/25 10:27, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   accel/split/split-accel-ops.c | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c
> index 399bf71a9ec..5a36e22f205 100644
> --- a/accel/split/split-accel-ops.c
> +++ b/accel/split/split-accel-ops.c
> @@ -249,7 +249,15 @@ static void split_synchronize_pre_resume(bool step_pending)
>   
>   static void split_handle_interrupt(CPUState *cpu, int mask)
>   {
> -    g_assert_not_reached();
> +    SplitAccelState *sas = SPLIT_ACCEL(cpu->accel->accel);
> +    AccelClass *ac = cpu->accel->use_hw ? ACCEL_GET_CLASS(sas->hw)
> +                                        : ACCEL_GET_CLASS(sas->sw);
> +
> +    if (ac->ops->handle_interrupt) {
> +        ac->ops->handle_interrupt(cpu, mask);
> +    } else {
> +        generic_handle_interrupt(cpu, mask);
> +    }

Better to have handle_interrupt always filled-in.

r~
diff mbox series

Patch

diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c
index 399bf71a9ec..5a36e22f205 100644
--- a/accel/split/split-accel-ops.c
+++ b/accel/split/split-accel-ops.c
@@ -249,7 +249,15 @@  static void split_synchronize_pre_resume(bool step_pending)
 
 static void split_handle_interrupt(CPUState *cpu, int mask)
 {
-    g_assert_not_reached();
+    SplitAccelState *sas = SPLIT_ACCEL(cpu->accel->accel);
+    AccelClass *ac = cpu->accel->use_hw ? ACCEL_GET_CLASS(sas->hw)
+                                        : ACCEL_GET_CLASS(sas->sw);
+
+    if (ac->ops->handle_interrupt) {
+        ac->ops->handle_interrupt(cpu, mask);
+    } else {
+        generic_handle_interrupt(cpu, mask);
+    }
 }
 
 static int64_t split_get_virtual_clock(void)