Skip to content

Commit

Permalink
vl: init main loop earlier
Browse files Browse the repository at this point in the history
Otherwise, chardevs will not be able to create a bottom half as soon
as that will require an AioContext.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed Oct 30, 2012
1 parent d0cc2fb commit 1c53786
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vl.c
Expand Up @@ -3311,6 +3311,12 @@ int main(int argc, char **argv, char **envp)
}
loc_set_none();

qemu_init_cpu_loop();
if (qemu_init_main_loop()) {
fprintf(stderr, "qemu_init_main_loop failed\n");
exit(1);
}

if (qemu_opts_foreach(qemu_find_opts("sandbox"), parse_sandbox, NULL, 0)) {
exit(1);
}
Expand Down Expand Up @@ -3463,12 +3469,6 @@ int main(int argc, char **argv, char **envp)

configure_accelerator();

qemu_init_cpu_loop();
if (qemu_init_main_loop()) {
fprintf(stderr, "qemu_init_main_loop failed\n");
exit(1);
}

machine_opts = qemu_opts_find(qemu_find_opts("machine"), 0);
if (machine_opts) {
kernel_filename = qemu_opt_get(machine_opts, "kernel");
Expand Down

0 comments on commit 1c53786

Please sign in to comment.