Received: from eggs.gnu.org ([208.118.235.92]:46390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTaH5-0008Hu-Ew for qemu-devel@nongnu.org; Wed, 31 Oct 2012 11:32:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTaH1-0005F5-Bm for qemu-devel@nongnu.org; Wed, 31 Oct 2012 11:32:11 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:55215) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTaH1-0004oe-5H for qemu-devel@nongnu.org; Wed, 31 Oct 2012 11:32:07 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so1006039pad.4 for ; Wed, 31 Oct 2012 08:32:06 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 31 Oct 2012 16:30:32 +0100 Message-Id: <1351697456-16107-16-git-send-email-pbonzini@redhat.com> In-Reply-To: <1351697456-16107-1-git-send-email-pbonzini@redhat.com> References: <1351697456-16107-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 15/39] vl: init main loop earlier List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, stefanha@redhat.com Otherwise, chardevs will not be able to create a bottom half as soon as that will require an AioContext. Signed-off-by: Paolo Bonzini --- vl.c | 12 ++++++------ 1 file modificato, 6 inserzioni(+), 6 rimozioni(-) diff --git a/vl.c b/vl.c index b3186fa..f84e969 100644 --- a/vl.c +++ b/vl.c @@ -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); } @@ -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"); -- 1.7.12.1