[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 18/27] vl: Fix latent bug with -global and onboard de
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PULL 18/27] vl: Fix latent bug with -global and onboard devices |
Date: |
Mon, 11 Mar 2019 23:08:34 +0100 |
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 <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
---
vl.c | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/vl.c b/vl.c
index 5278beaae0..4f84d6568f 100644
--- a/vl.c
+++ b/vl.c
@@ -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) {
@@ -4250,12 +4241,6 @@ int main(int argc, char **argv, char **envp)
machine_class->name, machine_class->deprecation_reason);
}
- /*
- * 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.
--
2.17.2
- [Qemu-devel] [PULL 07/27] ppc405_boards: Delete stale, disabled DEBUG_BOARD_INIT code, (continued)
- [Qemu-devel] [PULL 07/27] ppc405_boards: Delete stale, disabled DEBUG_BOARD_INIT code, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 21/27] vl: Factor configure_blockdev() out of main(), Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 26/27] pc: Support firmware configuration with -blockdev, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 13/27] mips_malta: Clean up definition of flash memory size somewhat, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 25/27] pc_sysfw: Pass PCMachineState to pc_system_firmware_init(), Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 27/27] docs/interop/firmware.json: Prefer -machine to if=pflash, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 15/27] pflash: Clean up after commit 368a354f02b, part 2, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 22/27] vl: Create block backends before setting machine properties, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 18/27] vl: Fix latent bug with -global and onboard devices,
Markus Armbruster <=
- [Qemu-devel] [PULL 23/27] pflash_cfi01: Add pflash_cfi01_get_blk() helper, Markus Armbruster, 2019/03/11
- [Qemu-devel] [PULL 14/27] pflash: Clean up after commit 368a354f02b, part 1, Markus Armbruster, 2019/03/11
- Re: [Qemu-devel] [PULL 00/27] Pflash and firmware configuration patches for 2019-03-11, Peter Maydell, 2019/03/12