void qemu_savevm_state_begin(QEMUFile *f,

                             const MigrationParams *params)

{

    SaveStateEntry *se;

    int ret;



    trace_savevm_state_begin();

    QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {

        if (!se->ops || !se->ops->set_params) {

            continue;

        }

        se->ops->set_params(params, se->opaque);

    }



    QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {

        if (!se->ops || !se->ops->save_live_setup) {

            continue;

        }

        if (se->ops && se->ops->is_active) {

            if (!se->ops->is_active(se->opaque)) {

                continue;

            }

        }

        save_section_header(f, se, QEMU_VM_SECTION_START);



        ret = se->ops->save_live_setup(f, se->opaque);


        if (ret < 0) {

            qemu_file_set_error(f, ret);

            break;

        }

    }

}
void qemu_savevm_state_begin(QEMUFile *f,

                             const MigrationParams *params)

{

    SaveStateEntry *se;

    int ret;



    trace_savevm_state_begin();

    QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {

        if (!se->ops || !se->ops->set_params) {

            continue;

        }

        se->ops->set_params(params, se->opaque);

    }



    QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {

        if (!se->ops || !se->ops->save_live_setup) {

            continue;

        }

        if (se->ops && se->ops->is_active) {

            if (!se->ops->is_active(se->opaque)) {

                continue;

            }

        }

        save_section_header(f, se, QEMU_VM_SECTION_START);



        ret = se->ops->save_live_setup(f, se->opaque);


        if (ret < 0) {

            qemu_file_set_error(f, ret);

            break;

        }

    }

}
void FUNC_0(QEMUFile *VAR_0,

                             const MigrationParams *VAR_1)

{

    SaveStateEntry *se;

    int VAR_2;



    trace_savevm_state_begin();

    QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {

        if (!se->ops || !se->ops->set_params) {

            continue;

        }

        se->ops->set_params(VAR_1, se->opaque);

    }



    QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {

        if (!se->ops || !se->ops->save_live_setup) {

            continue;

        }

        if (se->ops && se->ops->is_active) {

            if (!se->ops->is_active(se->opaque)) {

                continue;

            }

        }

        save_section_header(VAR_0, se, QEMU_VM_SECTION_START);



        VAR_2 = se->ops->save_live_setup(VAR_0, se->opaque);


        if (VAR_2 < 0) {

            qemu_file_set_error(VAR_0, VAR_2);

            break;

        }

    }

}
void FUNC_0(QEMUFile *VAR_0,
const MigrationParams *VAR_1)
{ SaveStateEntry *se; int VAR_2; trace_savevm_state_begin(); QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { if (!se->ops || !se->ops->set_params) { continue; } se->ops->set_params(VAR_1, se->opaque); } QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { if (!se->ops || !se->ops->save_live_setup) { continue; } if (se->ops && se->ops->is_active) { if (!se->ops->is_active(se->opaque)) { continue; } } save_section_header(VAR_0, se, QEMU_VM_SECTION_START); VAR_2 = se->ops->save_live_setup(VAR_0, se->opaque); if (VAR_2 < 0) { qemu_file_set_error(VAR_0, VAR_2); break; } } }