On Wed, Jun 28, 2017 at 04:13:57PM -0300, Eduardo Habkost wrote: > On Tue, Jun 27, 2017 at 12:10:15PM +0800, Peter Xu wrote: > > 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 <quint...@redhat.com> > > Signed-off-by: Peter Xu <pet...@redhat.com> > [...] > > +void migration_only_migratable_set(void) > > +{ > > + migrate_get_current()->only_migratable = true; > > +} > > + > [...] > > @@ -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(); > > This triggers a premature call to migrate_get_current(): > > $ qemu-system-x86_64 -only-migratable > qemu-system-x86_64: > /home/ehabkost/rh/proj/virt/qemu/migration/migration.c:127: > migrate_get_current: Assertion `current_migration' failed. > Aborted (core dumped) > > What about just doing: > > qemu_global_option("migration.only-migratable=true");
Oops... Definitely. Thanks for pointing this out! I'll see whether I should respin or fix on top. -- Peter Xu