Revision 72cf2d4f kvm-all.c

b/kvm-all.c
428 428
    s = qemu_mallocz(sizeof(KVMState));
429 429

  
430 430
#ifdef KVM_CAP_SET_GUEST_DEBUG
431
    TAILQ_INIT(&s->kvm_sw_breakpoints);
431
    QTAILQ_INIT(&s->kvm_sw_breakpoints);
432 432
#endif
433 433
    for (i = 0; i < ARRAY_SIZE(s->slots); i++)
434 434
        s->slots[i].slot = i;
......
917 917
{
918 918
    struct kvm_sw_breakpoint *bp;
919 919

  
920
    TAILQ_FOREACH(bp, &env->kvm_state->kvm_sw_breakpoints, entry) {
920
    QTAILQ_FOREACH(bp, &env->kvm_state->kvm_sw_breakpoints, entry) {
921 921
        if (bp->pc == pc)
922 922
            return bp;
923 923
    }
......
926 926

  
927 927
int kvm_sw_breakpoints_active(CPUState *env)
928 928
{
929
    return !TAILQ_EMPTY(&env->kvm_state->kvm_sw_breakpoints);
929
    return !QTAILQ_EMPTY(&env->kvm_state->kvm_sw_breakpoints);
930 930
}
931 931

  
932 932
struct kvm_set_guest_debug_data {
......
983 983
            return err;
984 984
        }
985 985

  
986
        TAILQ_INSERT_HEAD(&current_env->kvm_state->kvm_sw_breakpoints,
986
        QTAILQ_INSERT_HEAD(&current_env->kvm_state->kvm_sw_breakpoints,
987 987
                          bp, entry);
988 988
    } else {
989 989
        err = kvm_arch_insert_hw_breakpoint(addr, len, type);
......
1020 1020
        if (err)
1021 1021
            return err;
1022 1022

  
1023
        TAILQ_REMOVE(&current_env->kvm_state->kvm_sw_breakpoints, bp, entry);
1023
        QTAILQ_REMOVE(&current_env->kvm_state->kvm_sw_breakpoints, bp, entry);
1024 1024
        qemu_free(bp);
1025 1025
    } else {
1026 1026
        err = kvm_arch_remove_hw_breakpoint(addr, len, type);
......
1042 1042
    KVMState *s = current_env->kvm_state;
1043 1043
    CPUState *env;
1044 1044

  
1045
    TAILQ_FOREACH_SAFE(bp, &s->kvm_sw_breakpoints, entry, next) {
1045
    QTAILQ_FOREACH_SAFE(bp, &s->kvm_sw_breakpoints, entry, next) {
1046 1046
        if (kvm_arch_remove_sw_breakpoint(current_env, bp) != 0) {
1047 1047
            /* Try harder to find a CPU that currently sees the breakpoint. */
1048 1048
            for (env = first_cpu; env != NULL; env = env->next_cpu) {

Also available in: Unified diff