Revision bb4ea393

b/kvm-all.c
989 989
        default:
990 990
            DPRINTF("kvm_arch_handle_exit\n");
991 991
            ret = kvm_arch_handle_exit(env, run);
992
            if (ret == 0) {
993
                ret = EXCP_INTERRUPT;
994
            } else if (ret > 0) {
995
                ret = 0;
996
            }
997 992
            break;
998 993
        }
999 994
    } while (ret == 0);
b/target-i386/kvm.c
1618 1618
          (env->eflags & IF_MASK)) &&
1619 1619
        !(env->interrupt_request & CPU_INTERRUPT_NMI)) {
1620 1620
        env->halted = 1;
1621
        return 0;
1621
        return EXCP_HLT;
1622 1622
    }
1623 1623

  
1624
    return 1;
1624
    return 0;
1625 1625
}
1626 1626

  
1627 1627
static bool host_supports_vmx(void)
......
1637 1637
int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run)
1638 1638
{
1639 1639
    uint64_t code;
1640
    int ret = 0;
1640
    int ret;
1641 1641

  
1642 1642
    switch (run->exit_reason) {
1643 1643
    case KVM_EXIT_HLT:
......
1645 1645
        ret = kvm_handle_halt(env);
1646 1646
        break;
1647 1647
    case KVM_EXIT_SET_TPR:
1648
        ret = 1;
1648
        ret = 0;
1649 1649
        break;
1650 1650
    case KVM_EXIT_FAIL_ENTRY:
1651 1651
        code = run->fail_entry.hardware_entry_failure_reason;
b/target-ppc/kvm.c
271 271
        env->exception_index = EXCP_HLT;
272 272
    }
273 273

  
274
    return 1;
274
    return 0;
275 275
}
276 276

  
277 277
/* map dcr access to existing qemu dcr emulation */
......
280 280
    if (ppc_dcr_read(env->dcr_env, dcrn, data) < 0)
281 281
        fprintf(stderr, "Read to unhandled DCR (0x%x)\n", dcrn);
282 282

  
283
    return 1;
283
    return 0;
284 284
}
285 285

  
286 286
static int kvmppc_handle_dcr_write(CPUState *env, uint32_t dcrn, uint32_t data)
......
288 288
    if (ppc_dcr_write(env->dcr_env, dcrn, data) < 0)
289 289
        fprintf(stderr, "Write to unhandled DCR (0x%x)\n", dcrn);
290 290

  
291
    return 1;
291
    return 0;
292 292
}
293 293

  
294 294
int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run)
295 295
{
296
    int ret = 0;
296
    int ret;
297 297

  
298 298
    switch (run->exit_reason) {
299 299
    case KVM_EXIT_DCR:
b/target-s390x/kvm.c
497 497
            break;
498 498
    }
499 499

  
500
    if (ret == 0) {
501
        ret = EXCP_INTERRUPT;
502
    } else if (ret > 0) {
503
        ret = 0;
504
    }
500 505
    return ret;
501 506
}
502 507

  

Also available in: Unified diff