diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-03-08 14:14:36 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-03-11 22:53:44 +0100 |
commit | fc4a473482d595da08ae20ce239f0b62fa55d0f2 (patch) | |
tree | 4abd61e4c87c8b0db58b8a252827ca64478b4da0 /vl.c | |
parent | 617902af2c9203f4bb4112eb384870e248d42ad7 (diff) | |
download | qemu-fc4a473482d595da08ae20ce239f0b62fa55d0f2.zip |
vl: Fix latent bug with -global and onboard devices
main() registers the user's -global only after we create the machine
object, i.e. too late for devices created in the machine's
.instance_init().
Fortunately, we know the bug is only latent: the commit before
previous fixed a bug that would've crashed any attempt to create a
device in an .instance_init().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20190308131445.17502-4-armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 19 |
1 files changed, 2 insertions, 17 deletions
@@ -2937,17 +2937,6 @@ static void user_register_global_props(void) global_init_func, NULL, NULL); } -/* - * Note: we should see that these properties are actually having a - * priority: accel < machine < user. This means e.g. when user - * specifies something in "-global", it'll always be used with highest - * priority than either machine/accelerator compat properties. - */ -static void register_global_properties(MachineState *ms) -{ - user_register_global_props(); -} - int main(int argc, char **argv, char **envp) { int i; @@ -3942,6 +3931,8 @@ int main(int argc, char **argv, char **envp) */ loc_set_none(); + user_register_global_props(); + replay_configure(icount_opts); if (incoming && !preconfig_exit_requested) { @@ -4251,12 +4242,6 @@ int main(int argc, char **argv, char **envp) } /* - * Register all the global properties, including accel properties, - * machine properties, and user-specified ones. - */ - register_global_properties(current_machine); - - /* * Migration object can only be created after global properties * are applied correctly. */ |