Commit 99694362 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/amit-migration/tags/migration-2.7-1' into staging



migration fixes:

- ensure src block devices continue fine after a failed migration
- fail on migration blockers; helps 9p savevm/loadvm
- move autoconverge commands out of experimental state
- move the migration-specific qjson in migration/

# gpg: Signature made Mon 23 May 2016 18:15:09 BST using RSA key ID 657EF670
# gpg: Good signature from "Amit Shah <amit@amitshah.net>"
# gpg:                 aka "Amit Shah <amit@kernel.org>"
# gpg:                 aka "Amit Shah <amitshah@gmx.net>"

* remotes/amit-migration/tags/migration-2.7-1:
  migration: regain control of images when migration fails to complete
  savevm: fail if migration blockers are present
  migration: Promote improved autoconverge commands out of experimental state
  migration/qjson: Drop gratuitous use of QOM
  migration: Move qjson.[ch] to migration/

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents b0f6ef89 fe904ea8
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ common-obj-$(CONFIG_LINUX) += fsdev/
common-obj-y += migration/
common-obj-y += qemu-char.o #aio.o
common-obj-y += page_cache.o
common-obj-y += qjson.o

common-obj-$(CONFIG_SPICE) += spice-qemu-char.o

+14 −14
Original line number Diff line number Diff line
@@ -235,9 +235,9 @@ void hmp_info_migrate(Monitor *mon, const QDict *qdict)
                       info->xbzrle_cache->overflow);
    }

    if (info->has_x_cpu_throttle_percentage) {
    if (info->has_cpu_throttle_percentage) {
        monitor_printf(mon, "cpu throttle percentage: %" PRIu64 "\n",
                       info->x_cpu_throttle_percentage);
                       info->cpu_throttle_percentage);
    }

    qapi_free_MigrationInfo(info);
@@ -281,11 +281,11 @@ void hmp_info_migrate_parameters(Monitor *mon, const QDict *qdict)
            MigrationParameter_lookup[MIGRATION_PARAMETER_DECOMPRESS_THREADS],
            params->decompress_threads);
        monitor_printf(mon, " %s: %" PRId64,
            MigrationParameter_lookup[MIGRATION_PARAMETER_X_CPU_THROTTLE_INITIAL],
            params->x_cpu_throttle_initial);
            MigrationParameter_lookup[MIGRATION_PARAMETER_CPU_THROTTLE_INITIAL],
            params->cpu_throttle_initial);
        monitor_printf(mon, " %s: %" PRId64,
            MigrationParameter_lookup[MIGRATION_PARAMETER_X_CPU_THROTTLE_INCREMENT],
            params->x_cpu_throttle_increment);
            MigrationParameter_lookup[MIGRATION_PARAMETER_CPU_THROTTLE_INCREMENT],
            params->cpu_throttle_increment);
        monitor_printf(mon, "\n");
    }

@@ -1240,8 +1240,8 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
    bool has_compress_level = false;
    bool has_compress_threads = false;
    bool has_decompress_threads = false;
    bool has_x_cpu_throttle_initial = false;
    bool has_x_cpu_throttle_increment = false;
    bool has_cpu_throttle_initial = false;
    bool has_cpu_throttle_increment = false;
    int i;

    for (i = 0; i < MIGRATION_PARAMETER__MAX; i++) {
@@ -1256,18 +1256,18 @@ void hmp_migrate_set_parameter(Monitor *mon, const QDict *qdict)
            case MIGRATION_PARAMETER_DECOMPRESS_THREADS:
                has_decompress_threads = true;
                break;
            case MIGRATION_PARAMETER_X_CPU_THROTTLE_INITIAL:
                has_x_cpu_throttle_initial = true;
            case MIGRATION_PARAMETER_CPU_THROTTLE_INITIAL:
                has_cpu_throttle_initial = true;
                break;
            case MIGRATION_PARAMETER_X_CPU_THROTTLE_INCREMENT:
                has_x_cpu_throttle_increment = true;
            case MIGRATION_PARAMETER_CPU_THROTTLE_INCREMENT:
                has_cpu_throttle_increment = true;
                break;
            }
            qmp_migrate_set_parameters(has_compress_level, value,
                                       has_compress_threads, value,
                                       has_decompress_threads, value,
                                       has_x_cpu_throttle_initial, value,
                                       has_x_cpu_throttle_increment, value,
                                       has_cpu_throttle_initial, value,
                                       has_cpu_throttle_increment, value,
                                       &err);
            break;
        }
+1 −0
Original line number Diff line number Diff line
@@ -210,6 +210,7 @@ int migrate_fd_close(MigrationState *s);
void add_migration_state_change_notifier(Notifier *notify);
void remove_migration_state_change_notifier(Notifier *notify);
MigrationState *migrate_init(const MigrationParams *params);
bool migration_is_blocked(Error **errp);
bool migration_in_setup(MigrationState *);
bool migration_has_finished(MigrationState *);
bool migration_has_failed(MigrationState *);
+1 −1
Original line number Diff line number Diff line
@@ -13,10 +13,10 @@
#ifndef QEMU_QJSON_H
#define QEMU_QJSON_H

#define TYPE_QJSON "QJSON"
typedef struct QJSON QJSON;

QJSON *qjson_new(void);
void qjson_destroy(QJSON *json);
void json_prop_str(QJSON *json, const char *name, const char *str);
void json_prop_int(QJSON *json, const char *name, int64_t val);
void json_end_array(QJSON *json);
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@
#ifndef CONFIG_USER_ONLY
#include <migration/qemu-file.h>
#endif
#include <qjson.h>
#include "migration/qjson.h"

typedef void SaveStateHandler(QEMUFile *f, void *opaque);
typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
Loading