]> Git Repo - qemu.git/commitdiff
accel: move call to accel_init_interfaces
authorClaudio Fontana <[email protected]>
Mon, 22 Mar 2021 13:27:58 +0000 (14:27 +0100)
committerPaolo Bonzini <[email protected]>
Mon, 10 May 2021 19:41:52 +0000 (15:41 -0400)
move the call for sysemu specifically in machine_run_board_init,
mirror the calling sequence for user mode too.

Suggested-by: Paolo Bonzini <[email protected]>
Signed-off-by: Claudio Fontana <[email protected]>
Message-Id: <20210322132800[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
bsd-user/main.c
hw/core/machine.c
linux-user/main.c
softmmu/vl.c

index 36a889d084e578dd8052581210236f15656d8041..715129e624fabdf80127fa94fbee0e5a0fbbccfc 100644 (file)
@@ -913,8 +913,8 @@ int main(int argc, char **argv)
     {
         AccelClass *ac = ACCEL_GET_CLASS(current_accel());
 
-        ac->init_machine(NULL);
         accel_init_interfaces(ac);
+        ac->init_machine(NULL);
     }
     cpu = cpu_create(cpu_type);
     env = cpu->env_ptr;
index 0f5ce43d0c2c1017b1cd7c2a5af5b90356039a1f..1bf0e687b94a20ea7b50b886df67338b14aaf9f6 100644 (file)
@@ -1234,6 +1234,7 @@ void machine_run_board_init(MachineState *machine)
                                    "on", false);
     }
 
+    accel_init_interfaces(ACCEL_GET_CLASS(machine->accelerator));
     machine_class->init(machine);
     phase_advance(PHASE_MACHINE_INITIALIZED);
 }
index 57ba1b45ab6aea513419ac119e8fdc3b20da1b77..7995b6e7a6de2d95474816f881fc1f84e6f9a87e 100644 (file)
@@ -729,8 +729,8 @@ int main(int argc, char **argv, char **envp)
     {
         AccelClass *ac = ACCEL_GET_CLASS(current_accel());
 
-        ac->init_machine(NULL);
         accel_init_interfaces(ac);
+        ac->init_machine(NULL);
     }
     cpu = cpu_create(cpu_type);
     env = cpu->env_ptr;
index 307944aef3021716df063977a145608126fd1609..93e78469bcee8eb830db3cabea8aaff4b73cc2ba 100644 (file)
@@ -3595,7 +3595,6 @@ void qemu_init(int argc, char **argv, char **envp)
         current_machine->cpu_type = parse_cpu_option(cpu_option);
     }
     /* NB: for machine none cpu_type could STILL be NULL here! */
-    accel_init_interfaces(ACCEL_GET_CLASS(current_machine->accelerator));
 
     qemu_resolve_machine_memdev();
     parse_numa_opts(current_machine);
This page took 0.051004 seconds and 4 git commands to generate.