[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 06/10] migration: move only_migratable to Mig
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH v6 06/10] migration: move only_migratable to MigrationState |
Date: |
Thu, 29 Jun 2017 10:33:23 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
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 <address@hidden>
> > Signed-off-by: Peter Xu <address@hidden>
> [...]
> > +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
[Qemu-devel] [PATCH v6 07/10] migration: move skip_configuration out, Peter Xu, 2017/06/27
[Qemu-devel] [PATCH v6 08/10] migration: move skip_section_footers, Peter Xu, 2017/06/27
[Qemu-devel] [PATCH v6 09/10] migration: merge enforce_config_section somewhat, Peter Xu, 2017/06/27