static int kvm_handle_internal_error(CPUState *env, struct kvm_run *run)

{

    fprintf(stderr, "KVM internal error.");

    if (kvm_check_extension(kvm_state, KVM_CAP_INTERNAL_ERROR_DATA)) {

        int i;



        fprintf(stderr, " Suberror: %d\n", run->internal.suberror);

        for (i = 0; i < run->internal.ndata; ++i) {

            fprintf(stderr, "extra data[%d]: %"PRIx64"\n",

                    i, (uint64_t)run->internal.data[i]);

        }

    } else {

        fprintf(stderr, "\n");

    }

    if (run->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) {

        fprintf(stderr, "emulation failure\n");

        if (!kvm_arch_stop_on_emulation_error(env)) {

            cpu_dump_state(env, stderr, fprintf, CPU_DUMP_CODE);

            return 0;

        }

    }

    /* FIXME: Should trigger a qmp message to let management know

     * something went wrong.

     */

    return -1;

}

static int kvm_handle_internal_error(CPUState *env, struct kvm_run *run)

{

    fprintf(stderr, "KVM internal error.");

    if (kvm_check_extension(kvm_state, KVM_CAP_INTERNAL_ERROR_DATA)) {

        int i;



        fprintf(stderr, " Suberror: %d\n", run->internal.suberror);

        for (i = 0; i < run->internal.ndata; ++i) {

            fprintf(stderr, "extra data[%d]: %"PRIx64"\n",

                    i, (uint64_t)run->internal.data[i]);

        }

    } else {

        fprintf(stderr, "\n");

    }

    if (run->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) {

        fprintf(stderr, "emulation failure\n");

        if (!kvm_arch_stop_on_emulation_error(env)) {

            cpu_dump_state(env, stderr, fprintf, CPU_DUMP_CODE);

            return 0;

        }

    }

    





    return -1;

}

static int FUNC_0(CPUState *VAR_0, struct kvm_run *VAR_1)

{

    fprintf(stderr, "KVM internal error.");

    if (kvm_check_extension(kvm_state, KVM_CAP_INTERNAL_ERROR_DATA)) {

        int VAR_2;



        fprintf(stderr, " Suberror: %d\n", VAR_1->internal.suberror);

        for (VAR_2 = 0; VAR_2 < VAR_1->internal.ndata; ++VAR_2) {

            fprintf(stderr, "extra data[%d]: %"PRIx64"\n",

                    VAR_2, (uint64_t)VAR_1->internal.data[VAR_2]);

        }

    } else {

        fprintf(stderr, "\n");

    }

    if (VAR_1->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) {

        fprintf(stderr, "emulation failure\n");

        if (!kvm_arch_stop_on_emulation_error(VAR_0)) {

            cpu_dump_state(VAR_0, stderr, fprintf, CPU_DUMP_CODE);

            return 0;

        }

    }

    





    return -1;

}

static int FUNC_0(CPUState *VAR_0, struct kvm_run *VAR_1)
{ fprintf(stderr, "KVM internal error."); if (kvm_check_extension(kvm_state, KVM_CAP_INTERNAL_ERROR_DATA)) { int VAR_2; fprintf(stderr, " Suberror: %d\n", VAR_1->internal.suberror); for (VAR_2 = 0; VAR_2 < VAR_1->internal.ndata; ++VAR_2) { fprintf(stderr, "extra data[%d]: %"PRIx64"\n",
VAR_2, (uint64_t)VAR_1->internal.data[VAR_2]); } } else { fprintf(stderr, "\n"); } if (VAR_1->internal.suberror == KVM_INTERNAL_ERROR_EMULATION) { fprintf(stderr, "emulation failure\n"); if (!kvm_arch_stop_on_emulation_error(VAR_0)) { cpu_dump_state(VAR_0, stderr, fprintf, CPU_DUMP_CODE); return 0; } } return -1; }