Add blockers for cpr-exec migration mode for devices and options that do not support it.
Signed-off-by: Steve Sistare <steven.sist...@oracle.com> --- accel/xen/xen-all.c | 3 +++ migration/migration.c | 5 +++++ replay/replay.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c index 69aa7d0..2896044 100644 --- a/accel/xen/xen-all.c +++ b/accel/xen/xen-all.c @@ -181,6 +181,9 @@ static int xen_init(MachineState *ms) * opt out of system RAM being allocated by generic code */ mc->default_ram_id = NULL; + + migrate_add_blocker_always("xen does not support cpr exec", + &error_fatal, MIG_MODE_CPR_EXEC, -1); return 0; } diff --git a/migration/migration.c b/migration/migration.c index 1a8a6ff..7b46213 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1348,6 +1348,11 @@ static bool migrate_caps_check(bool *cap_list, } } + if (cap_list[MIGRATION_CAPABILITY_X_COLO]) { + return migrate_add_blocker_always("x-colo is not compatible with cpr", + errp, MIG_MODE_CPR_EXEC, -1); + } + return true; } diff --git a/replay/replay.c b/replay/replay.c index 4c396bb..b0194dd 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -19,6 +19,7 @@ #include "qemu/option.h" #include "sysemu/cpus.h" #include "qemu/error-report.h" +#include "migration/blocker.h" /* Current version of the replay mechanism. Increase it when file format changes. */ @@ -232,6 +233,9 @@ static void replay_enable(const char *fname, int mode) const char *fmode = NULL; assert(!replay_file); + migrate_add_blocker_always("replay is not compatible with cpr", + &error_fatal, MIG_MODE_CPR_EXEC, -1); + switch (mode) { case REPLAY_MODE_RECORD: fmode = "wb"; -- 1.8.3.1