Revision 6792a57b kvm-all.c

b/kvm-all.c
895 895

  
896 896
    if (kvm_arch_process_irqchip_events(env)) {
897 897
        env->exit_request = 0;
898
        env->exception_index = EXCP_HLT;
899
        return 0;
898
        return EXCP_HLT;
900 899
    }
901 900

  
901
    cpu_single_env = env;
902

  
902 903
    do {
903 904
        if (env->kvm_vcpu_dirty) {
904 905
            kvm_arch_put_registers(env, KVM_PUT_RUNTIME_STATE);
......
927 928
        kvm_flush_coalesced_mmio_buffer();
928 929

  
929 930
        if (ret == -EINTR || ret == -EAGAIN) {
930
            cpu_exit(env);
931 931
            DPRINTF("io window exit\n");
932 932
            ret = 0;
933 933
            break;
......
978 978
            DPRINTF("kvm_exit_debug\n");
979 979
#ifdef KVM_CAP_SET_GUEST_DEBUG
980 980
            if (kvm_arch_debug(&run->debug.arch)) {
981
                env->exception_index = EXCP_DEBUG;
982
                return 0;
981
                ret = EXCP_DEBUG;
982
                goto out;
983 983
            }
984 984
            /* re-enter, this exception was guest-internal */
985 985
            ret = 1;
......
995 995
    if (ret < 0) {
996 996
        cpu_dump_state(env, stderr, fprintf, CPU_DUMP_CODE);
997 997
        vm_stop(VMSTOP_PANIC);
998
        env->exit_request = 1;
999
    }
1000
    if (env->exit_request) {
1001
        env->exit_request = 0;
1002
        env->exception_index = EXCP_INTERRUPT;
1003 998
    }
999
    ret = EXCP_INTERRUPT;
1004 1000

  
1001
out:
1002
    env->exit_request = 0;
1003
    cpu_single_env = NULL;
1005 1004
    return ret;
1006 1005
}
1007 1006

  

Also available in: Unified diff