summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2017-06-27 12:10:15 +0800
committerJuan Quintela <quintela@redhat.com>2017-06-28 11:18:38 +0200
commit3df663e575f1876d7f3bc684f80e72fca0703d39 (patch)
treeeb60fd3480e91e3b24ac5ad298fec10a3a992e96 /vl.c
parent5272298c48eb3a01c41a7822e6303d0a0a05f004 (diff)
downloadqemu-3df663e575f1876d7f3bc684f80e72fca0703d39.tar.gz
migration: move only_migratable to MigrationState
One less global variable, and it does only matter with migration. We keep the old "--only-migratable" option, but also now we support: -global migration.only-migratable=true Currently still keep the old interface. Hmm, now vl.c has no way to access migrate_get_current(). Export a function for it to setup only_migratable. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-7-git-send-email-peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index f0a05158cb..36ff3f4345 100644
--- a/vl.c
+++ b/vl.c
@@ -188,7 +188,6 @@ bool boot_strict;
uint8_t *boot_splash_filedata;
size_t boot_splash_filedata_size;
uint8_t qemu_extra_params_fw[2];
-int only_migratable; /* turn it off unless user states otherwise */
int icount_align_option;
@@ -3953,7 +3952,13 @@ int main(int argc, char **argv, char **envp)
incoming = optarg;
break;
case QEMU_OPTION_only_migratable:
- only_migratable = 1;
+ /*
+ * TODO: we can remove this option one day, and we
+ * should all use:
+ *
+ * "-global migration.only-migratable=true"
+ */
+ migration_only_migratable_set();
break;
case QEMU_OPTION_nodefaults:
has_defaults = 0;