void kvm_remove_all_breakpoints(CPUState *cpu)

{

    struct kvm_sw_breakpoint *bp, *next;

    KVMState *s = cpu->kvm_state;



    QTAILQ_FOREACH_SAFE(bp, &s->kvm_sw_breakpoints, entry, next) {

        if (kvm_arch_remove_sw_breakpoint(cpu, bp) != 0) {

            /* Try harder to find a CPU that currently sees the breakpoint. */

            CPU_FOREACH(cpu) {

                if (kvm_arch_remove_sw_breakpoint(cpu, bp) == 0) {

                    break;

                }

            }

        }

        QTAILQ_REMOVE(&s->kvm_sw_breakpoints, bp, entry);

        g_free(bp);

    }

    kvm_arch_remove_all_hw_breakpoints();



    CPU_FOREACH(cpu) {

        kvm_update_guest_debug(cpu, 0);

    }

}

void kvm_remove_all_breakpoints(CPUState *cpu)

{

    struct kvm_sw_breakpoint *bp, *next;

    KVMState *s = cpu->kvm_state;



    QTAILQ_FOREACH_SAFE(bp, &s->kvm_sw_breakpoints, entry, next) {

        if (kvm_arch_remove_sw_breakpoint(cpu, bp) != 0) {

            

            CPU_FOREACH(cpu) {

                if (kvm_arch_remove_sw_breakpoint(cpu, bp) == 0) {

                    break;

                }

            }

        }

        QTAILQ_REMOVE(&s->kvm_sw_breakpoints, bp, entry);

        g_free(bp);

    }

    kvm_arch_remove_all_hw_breakpoints();



    CPU_FOREACH(cpu) {

        kvm_update_guest_debug(cpu, 0);

    }

}

            CPU_FOREACH(cpu) {                 if (kvm_arch_remove_sw_breakpoint(cpu, bp) == 0) {
void FUNC_0(CPUState *VAR_0)

{

    struct kvm_sw_breakpoint *VAR_1, *VAR_2;

    KVMState *s = VAR_0->kvm_state;



    QTAILQ_FOREACH_SAFE(VAR_1, &s->kvm_sw_breakpoints, entry, VAR_2) {

        if (kvm_arch_remove_sw_breakpoint(VAR_0, VAR_1) != 0) {

            

            CPU_FOREACH(VAR_0) {

                if (kvm_arch_remove_sw_breakpoint(VAR_0, VAR_1) == 0) {

                    break;

                }

            }

        }

        QTAILQ_REMOVE(&s->kvm_sw_breakpoints, VAR_1, entry);

        g_free(VAR_1);

    }

    kvm_arch_remove_all_hw_breakpoints();



    CPU_FOREACH(VAR_0) {

        kvm_update_guest_debug(VAR_0, 0);

    }

}

void FUNC_0(CPUState *VAR_0)
{ struct kvm_sw_breakpoint *VAR_1, *VAR_2; KVMState *s = VAR_0->kvm_state; QTAILQ_FOREACH_SAFE(VAR_1, &s->kvm_sw_breakpoints, entry, VAR_2) { if (kvm_arch_remove_sw_breakpoint(VAR_0, VAR_1) != 0) { CPU_FOREACH(VAR_0) { if (kvm_arch_remove_sw_breakpoint(VAR_0, VAR_1) == 0) { break; } } } QTAILQ_REMOVE(&s->kvm_sw_breakpoints, VAR_1, entry); g_free(VAR_1); } kvm_arch_remove_all_hw_breakpoints(); CPU_FOREACH(VAR_0) { kvm_update_guest_debug(VAR_0, 0); } }