static int kvm_irqchip_create(KVMState *s)

{

    QemuOptsList *list = qemu_find_opts("machine");

    int ret;



    if (QTAILQ_EMPTY(&list->head) ||

        !qemu_opt_get_bool(QTAILQ_FIRST(&list->head),

                           "kernel_irqchip", true) ||

        !kvm_check_extension(s, KVM_CAP_IRQCHIP)) {

        return 0;

    }



    ret = kvm_vm_ioctl(s, KVM_CREATE_IRQCHIP);

    if (ret < 0) {

        fprintf(stderr, "Create kernel irqchip failed\n");

        return ret;

    }



    kvm_kernel_irqchip = true;

    /* If we have an in-kernel IRQ chip then we must have asynchronous

     * interrupt delivery (though the reverse is not necessarily true)

     */

    kvm_async_interrupts_allowed = true;

    kvm_halt_in_kernel_allowed = true;



    kvm_init_irq_routing(s);



    return 0;

}

static int kvm_irqchip_create(KVMState *s)

{

    QemuOptsList *list = qemu_find_opts("machine");

    int ret;



    if (QTAILQ_EMPTY(&list->head) ||

        !qemu_opt_get_bool(QTAILQ_FIRST(&list->head),

                           "kernel_irqchip", true) ||

        !kvm_check_extension(s, KVM_CAP_IRQCHIP)) {

        return 0;

    }



    ret = kvm_vm_ioctl(s, KVM_CREATE_IRQCHIP);

    if (ret < 0) {

        fprintf(stderr, "Create kernel irqchip failed\n");

        return ret;

    }



    kvm_kernel_irqchip = true;

    





    kvm_async_interrupts_allowed = true;

    kvm_halt_in_kernel_allowed = true;



    kvm_init_irq_routing(s);



    return 0;

}

    QemuOptsList *list = qemu_find_opts("machine");     if (QTAILQ_EMPTY(&list->head) ||         !qemu_opt_get_bool(QTAILQ_FIRST(&list->head),                            "kernel_irqchip", true) ||     QemuOptsList *list = qemu_find_opts("machine");     QemuOptsList *list = qemu_find_opts("machine");
static int FUNC_0(KVMState *VAR_0)

{

    QemuOptsList *list = qemu_find_opts("machine");

    int VAR_1;



    if (QTAILQ_EMPTY(&list->head) ||

        !qemu_opt_get_bool(QTAILQ_FIRST(&list->head),

                           "kernel_irqchip", true) ||

        !kvm_check_extension(VAR_0, KVM_CAP_IRQCHIP)) {

        return 0;

    }



    VAR_1 = kvm_vm_ioctl(VAR_0, KVM_CREATE_IRQCHIP);

    if (VAR_1 < 0) {

        fprintf(stderr, "Create kernel irqchip failed\n");

        return VAR_1;

    }



    kvm_kernel_irqchip = true;

    





    kvm_async_interrupts_allowed = true;

    kvm_halt_in_kernel_allowed = true;



    kvm_init_irq_routing(VAR_0);



    return 0;

}

static int FUNC_0(KVMState *VAR_0)
{ QemuOptsList *list = qemu_find_opts("machine"); int VAR_1; if (QTAILQ_EMPTY(&list->head) ||
!qemu_opt_get_bool(QTAILQ_FIRST(&list->head),
"kernel_irqchip", true) ||
!kvm_check_extension(VAR_0, KVM_CAP_IRQCHIP)) { return 0; } VAR_1 = kvm_vm_ioctl(VAR_0, KVM_CREATE_IRQCHIP); if (VAR_1 < 0) { fprintf(stderr, "Create kernel irqchip failed\n"); return VAR_1; } kvm_kernel_irqchip = true; kvm_async_interrupts_allowed = true; kvm_halt_in_kernel_allowed = true; kvm_init_irq_routing(VAR_0); return 0; }