int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu)

{

    CPUState *cs = CPU(cpu);

    struct kvm_s390_irq_state irq_state;

    int r;



    if (!kvm_check_extension(kvm_state, KVM_CAP_S390_IRQ_STATE)) {

        return -ENOSYS;

    }



    if (cpu->irqstate_saved_size == 0) {

        return 0;

    }

    irq_state.buf = (uint64_t) cpu->irqstate;

    irq_state.len = cpu->irqstate_saved_size;



    r = kvm_vcpu_ioctl(cs, KVM_S390_SET_IRQ_STATE, &irq_state);

    if (r) {

        error_report("Setting interrupt state failed %d", r);

    }

    return r;

}

int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu)

{

    CPUState *cs = CPU(cpu);

    struct kvm_s390_irq_state irq_state;

    int r;



    if (!kvm_check_extension(kvm_state, KVM_CAP_S390_IRQ_STATE)) {

        return -ENOSYS;

    }



    if (cpu->irqstate_saved_size == 0) {

        return 0;

    }

    irq_state.buf = (uint64_t) cpu->irqstate;

    irq_state.len = cpu->irqstate_saved_size;



    r = kvm_vcpu_ioctl(cs, KVM_S390_SET_IRQ_STATE, &irq_state);

    if (r) {

        error_report("Setting interrupt state failed %d", r);

    }

    return r;

}

int FUNC_0(S390CPU *VAR_0)

{

    CPUState *cs = CPU(VAR_0);

    struct kvm_s390_irq_state VAR_1;

    int VAR_2;



    if (!kvm_check_extension(kvm_state, KVM_CAP_S390_IRQ_STATE)) {

        return -ENOSYS;

    }



    if (VAR_0->irqstate_saved_size == 0) {

        return 0;

    }

    VAR_1.buf = (uint64_t) VAR_0->irqstate;

    VAR_1.len = VAR_0->irqstate_saved_size;



    VAR_2 = kvm_vcpu_ioctl(cs, KVM_S390_SET_IRQ_STATE, &VAR_1);

    if (VAR_2) {

        error_report("Setting interrupt state failed %d", VAR_2);

    }

    return VAR_2;

}

int FUNC_0(S390CPU *VAR_0)
{ CPUState *cs = CPU(VAR_0); struct kvm_s390_irq_state VAR_1; int VAR_2; if (!kvm_check_extension(kvm_state, KVM_CAP_S390_IRQ_STATE)) { return -ENOSYS; } if (VAR_0->irqstate_saved_size == 0) { return 0; } VAR_1.buf = (uint64_t) VAR_0->irqstate; VAR_1.len = VAR_0->irqstate_saved_size; VAR_2 = kvm_vcpu_ioctl(cs, KVM_S390_SET_IRQ_STATE, &VAR_1); if (VAR_2) { error_report("Setting interrupt state failed %d", VAR_2); } return VAR_2; }