diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2019-04-02 16:13:59 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2019-04-02 16:13:59 +0100 |
commit | 37301a8d0fe2b2a837747548c1ecf7d73b6fe8ab (patch) | |
tree | 8c34caa21195893c59287a3138d9d58973890e27 /vl.c | |
parent | 436960c95946007aca713330e7a488a6f2e0696f (diff) | |
parent | 79b9d4bde7db3f760851217b329c68a883184c6b (diff) |
Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2019-04-02' into staging
Miscellaneous patches for 2019-04-02
# gpg: Signature made Tue 02 Apr 2019 12:54:27 BST
# gpg: using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full]
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-misc-2019-04-02:
accel: Unbreak accelerator fallback
vl: Document dependencies hiding in global and compat props
migration: Support adding migration blockers earlier
Revert "migration: move only_migratable to MigrationState"
Revert "vl: Fix to create migration object before block backends again"
qapi/migration.json: Rename COLOStatus last_mode to last-mode
qapi/migration.json: Fix ColoStatus member last_mode's version
vl: Fix error location of positional arguments
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 45 |
1 files changed, 30 insertions, 15 deletions
@@ -185,6 +185,7 @@ const char *prom_envs[MAX_PROM_ENVS]; int boot_menu; bool boot_strict; uint8_t *boot_splash_filedata; +int only_migratable; /* turn it off unless user states otherwise */ bool wakeup_suspend_enabled; int icount_align_option; @@ -3119,6 +3120,7 @@ int main(int argc, char **argv, char **envp) if (optind >= argc) break; if (argv[optind][0] != '-') { + loc_set_cmdline(argv, optind, 1); drive_add(IF_DEFAULT, 0, argv[optind++], HD_OPTS); } else { const QEMUOption *popt; @@ -3799,13 +3801,7 @@ int main(int argc, char **argv, char **envp) incoming = optarg; break; case QEMU_OPTION_only_migratable: - /* - * TODO: we can remove this option one day, and we - * should all use: - * - * "-global migration.only-migratable=true" - */ - qemu_global_option("migration.only-migratable=true"); + only_migratable = 1; break; case QEMU_OPTION_nodefaults: has_defaults = 0; @@ -4277,16 +4273,9 @@ int main(int argc, char **argv, char **envp) } /* - * Migration object can only be created after global properties - * are applied correctly. - */ - migration_object_init(); - - /* * Note: we need to create block backends before * machine_set_property(), so machine properties can refer to - * them, and after migration_object_init(), so we can create - * migration blockers. + * them. */ configure_blockdev(&bdo_queue, machine_class, snapshot); @@ -4297,13 +4286,39 @@ int main(int argc, char **argv, char **envp) current_machine->maxram_size = maxram_size; current_machine->ram_slots = ram_slots; + /* + * Note: uses machine properties such as kernel-irqchip, must run + * after machine_set_property(). + */ configure_accelerator(current_machine, argv[0]); + /* + * Beware, QOM objects created before this point miss global and + * compat properties. + * + * Global properties get set up by qdev_prop_register_global(), + * called from user_register_global_props(), and certain option + * desugaring. Also in CPU feature desugaring (buried in + * parse_cpu_model()), which happens below this point, but may + * only target the CPU type, which can only be created after + * parse_cpu_model() returned the type. + * + * Machine compat properties: object_set_machine_compat_props(). + * Accelerator compat props: object_set_accelerator_compat_props(), + * called from configure_accelerator(). + */ + if (!qtest_enabled() && machine_class->deprecation_reason) { error_report("Machine type '%s' is deprecated: %s", machine_class->name, machine_class->deprecation_reason); } + /* + * Note: creates a QOM object, must run only after global and + * compat properties have been set up. + */ + migration_object_init(); + if (qtest_chrdev) { qtest_init(qtest_chrdev, qtest_log, &error_fatal); } |