int kvm_arch_pre_run(CPUState *env, struct kvm_run *run)
{
    int r;
    unsigned irq;
    /* PowerPC Qemu tracks the various core input pins (interrupt, critical
     * interrupt, reset, etc) in PPC-specific env->irq_input_state. */
    if (run->ready_for_interrupt_injection &&
        (env->interrupt_request & CPU_INTERRUPT_HARD) &&
        (env->irq_input_state & (1<<PPC_INPUT_INT)))
    {
        /* For now KVM disregards the 'irq' argument. However, in the
         * future KVM could cache it in-kernel to avoid a heavyweight exit
         * when reading the UIC.
         */
        irq = -1U;
        dprintf("injected interrupt %d\n", irq);
        r = kvm_vcpu_ioctl(env, KVM_INTERRUPT, &irq);
        if (r < 0)
            printf("cpu %d fail inject %x\n", env->cpu_index, irq);
    /* We don't know if there are more interrupts pending after this. However,
     * the guest will return to userspace in the course of handling this one
     * anyways, so we will get a chance to deliver the rest. */
    return 0;
int kvm_arch_pre_run(CPUState *env, struct kvm_run *run)
{
    int r;
    unsigned irq;
    

    if (run->ready_for_interrupt_injection &&
        (env->interrupt_request & CPU_INTERRUPT_HARD) &&
        (env->irq_input_state & (1<<PPC_INPUT_INT)))
    {
        



        irq = -1U;
        dprintf("injected interrupt %d\n", irq);
        r = kvm_vcpu_ioctl(env, KVM_INTERRUPT, &irq);
        if (r < 0)
            printf("cpu %d fail inject %x\n", env->cpu_index, irq);
    


    return 0;
int FUNC_0(CPUState *VAR_0, struct kvm_run *VAR_1)
{
    int VAR_2;
    unsigned VAR_3;
    

    if (VAR_1->ready_for_interrupt_injection &&
        (VAR_0->interrupt_request & CPU_INTERRUPT_HARD) &&
        (VAR_0->irq_input_state & (1<<PPC_INPUT_INT)))
    {
        



        VAR_3 = -1U;
        dprintf("injected interrupt %d\n", VAR_3);
        VAR_2 = kvm_vcpu_ioctl(VAR_0, KVM_INTERRUPT, &VAR_3);
        if (VAR_2 < 0)
            printf("cpu %d fail inject %x\n", VAR_0->cpu_index, VAR_3);
    


    return 0;
int FUNC_0(CPUState *VAR_0, struct kvm_run *VAR_1)
{ int VAR_2; unsigned VAR_3; if (VAR_1->ready_for_interrupt_injection &&
(VAR_0->interrupt_request & CPU_INTERRUPT_HARD) &&
(VAR_0->irq_input_state & (1<<PPC_INPUT_INT)))
{ VAR_3 = -1U; dprintf("injected interrupt %d\n", VAR_3); VAR_2 = kvm_vcpu_ioctl(VAR_0, KVM_INTERRUPT, &VAR_3); if (VAR_2 < 0)
printf("cpu %d fail inject %x\n", VAR_0->cpu_index, VAR_3); return 0;