[RFC PATCH RESEND 33/42] accel/split: Implement update_guest_debug()

Philippe Mathieu-Daudé posted 42 patches 4 months, 3 weeks ago
[RFC PATCH RESEND 33/42] accel/split: Implement update_guest_debug()
Posted by Philippe Mathieu-Daudé 4 months, 3 weeks ago
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 accel/split/split-accel-ops.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c
index eb52d690c7c..d59e70e0d9b 100644
--- a/accel/split/split-accel-ops.c
+++ b/accel/split/split-accel-ops.c
@@ -252,7 +252,16 @@ static void split_handle_interrupt(CPUState *cpu, int mask)
 
 static int split_update_guest_debug(CPUState *cpu)
 {
-    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);
+    int ret = 0;
+
+    if (ac->ops->update_guest_debug) {
+        ret = ac->ops->update_guest_debug(cpu);
+    }
+
+    return ret;
 }
 
 static int split_insert_breakpoint(CPUState *cpu, int type,
-- 
2.49.0


Re: [RFC PATCH RESEND 33/42] accel/split: Implement update_guest_debug()
Posted by Richard Henderson 4 months, 3 weeks ago
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 | 11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/accel/split/split-accel-ops.c b/accel/split/split-accel-ops.c
> index eb52d690c7c..d59e70e0d9b 100644
> --- a/accel/split/split-accel-ops.c
> +++ b/accel/split/split-accel-ops.c
> @@ -252,7 +252,16 @@ static void split_handle_interrupt(CPUState *cpu, int mask)
>   
>   static int split_update_guest_debug(CPUState *cpu)
>   {
> -    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);
> +    int ret = 0;
> +
> +    if (ac->ops->update_guest_debug) {
> +        ret = ac->ops->update_guest_debug(cpu);
> +    }
> +
> +    return ret;
>   }
>   
>   static int split_insert_breakpoint(CPUState *cpu, int type,

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

r~