[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: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH v6 06/10] migration: move only_migratable to MigrationState |
Date: |
Wed, 28 Jun 2017 16:13:57 -0300 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
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");
> break;
> case QEMU_OPTION_nodefaults:
> has_defaults = 0;
> --
> 2.7.4
>
--
Eduardo
- Re: [Qemu-devel] [PATCH v6 04/10] migration: let MigrationState be a qdev, (continued)
- Re: [Qemu-devel] [PATCH v6 06/10] migration: move only_migratable to MigrationState,
Eduardo Habkost <=
[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