diff mbox series

[RFC,RESEND,15/42] accel/split: Implement synchronize_pre_resume()

Message ID 20250620172751.94231-16-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 | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Comments

Richard Henderson June 22, 2025, 2:47 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 | 12 +++++++++++-
>   1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c
> index 6b3ddf21a17..65feb929404 100644
> --- a/accel/split/split-accel-ops.c
> +++ b/accel/split/split-accel-ops.c
> @@ -175,7 +175,17 @@ static void split_synchronize_pre_loadvm(CPUState *cpu)
>   
>   static void split_synchronize_pre_resume(bool step_pending)
>   {
> -    g_assert_not_reached();
> +    AccelState *as = current_accel();
> +    SplitAccelState *sas = SPLIT_ACCEL(as);
> +    AccelClass *hwc = ACCEL_GET_CLASS(sas->hw);
> +    AccelClass *swc = ACCEL_GET_CLASS(sas->sw);
> +
> +    if (hwc->ops->synchronize_pre_resume) {
> +        hwc->ops->synchronize_pre_resume(step_pending);
> +    }
> +    if (swc->ops->synchronize_pre_resume) {
> +        swc->ops->synchronize_pre_resume(step_pending);
> +    }
>   }
>   
>   static void split_handle_interrupt(CPUState *cpu, int mask)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c
index 6b3ddf21a17..65feb929404 100644
--- a/accel/split/split-accel-ops.c
+++ b/accel/split/split-accel-ops.c
@@ -175,7 +175,17 @@  static void split_synchronize_pre_loadvm(CPUState *cpu)
 
 static void split_synchronize_pre_resume(bool step_pending)
 {
-    g_assert_not_reached();
+    AccelState *as = current_accel();
+    SplitAccelState *sas = SPLIT_ACCEL(as);
+    AccelClass *hwc = ACCEL_GET_CLASS(sas->hw);
+    AccelClass *swc = ACCEL_GET_CLASS(sas->sw);
+
+    if (hwc->ops->synchronize_pre_resume) {
+        hwc->ops->synchronize_pre_resume(step_pending);
+    }
+    if (swc->ops->synchronize_pre_resume) {
+        swc->ops->synchronize_pre_resume(step_pending);
+    }
 }
 
 static void split_handle_interrupt(CPUState *cpu, int mask)