[RFC PATCH RESEND 30/42] accel/split: Implement remove_all_breakpoints()

Philippe Mathieu-Daudé posted 42 patches 4 months, 3 weeks ago
[RFC PATCH RESEND 30/42] accel/split: Implement remove_all_breakpoints()
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 e1d91ace2fa..0f3d48fc68d 100644
--- a/accel/split/split-accel-ops.c
+++ b/accel/split/split-accel-ops.c
@@ -269,7 +269,16 @@ static int split_remove_breakpoint(CPUState *cpu, int type,
 
 static void split_remove_all_breakpoints(CPUState *cpu)
 {
-    g_assert_not_reached();
+    SplitAccelState *sas = SPLIT_ACCEL(cpu->accel->accel);
+    AccelClass *hwc = ACCEL_GET_CLASS(sas->hw);
+    AccelClass *swc = ACCEL_GET_CLASS(sas->sw);
+
+    if (hwc->ops->remove_all_breakpoints) {
+        hwc->ops->remove_all_breakpoints(cpu);
+    }
+    if (swc->ops->remove_all_breakpoints) {
+        swc->ops->remove_all_breakpoints(cpu);
+    }
 }
 
 static void split_get_vcpu_stats(CPUState *cpu, GString *buf)
-- 
2.49.0


Re: [RFC PATCH RESEND 30/42] accel/split: Implement remove_all_breakpoints()
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 e1d91ace2fa..0f3d48fc68d 100644
> --- a/accel/split/split-accel-ops.c
> +++ b/accel/split/split-accel-ops.c
> @@ -269,7 +269,16 @@ static int split_remove_breakpoint(CPUState *cpu, int type,
>   
>   static void split_remove_all_breakpoints(CPUState *cpu)
>   {
> -    g_assert_not_reached();
> +    SplitAccelState *sas = SPLIT_ACCEL(cpu->accel->accel);
> +    AccelClass *hwc = ACCEL_GET_CLASS(sas->hw);
> +    AccelClass *swc = ACCEL_GET_CLASS(sas->sw);
> +
> +    if (hwc->ops->remove_all_breakpoints) {
> +        hwc->ops->remove_all_breakpoints(cpu);
> +    }
> +    if (swc->ops->remove_all_breakpoints) {
> +        swc->ops->remove_all_breakpoints(cpu);
> +    }
>   }
>   
>   static void split_get_vcpu_stats(CPUState *cpu, GString *buf)

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

r~