From patchwork Wed Oct 31 15:30:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 195930 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 31BDC2C0168 for ; Thu, 1 Nov 2012 03:29:01 +1100 (EST) Received: from localhost ([::1]:39617 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTbA3-0005ih-AS for incoming@patchwork.ozlabs.org; Wed, 31 Oct 2012 12:28:59 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=3mFdsS1FHqj16OO6PlopSBC4K5SWwz7SZ1e1hUcG8zs=; b=FXO3WdH72dPULw1zLuGqzc1yG/ZKGzC+6Rd1xz5aZjyWoaxmxbYpfQnXPUsGGAg3fY ZiESWVWkt8qZWyJnBDGCpJjhMiYJ5tww8uT+RxE5nc8ikvosB6RplU4oz/ZPEuNCJqXg KONP3nJs2lsH0RPnA9ZsXSnqH6ozqBrLKnNgfRphH7YRe4src5bBuB5q7I97d2BuKC09 227s/ut/6Or8v6IYOcGcomB28q1MhjNHHYPXu+20TemwOehVWKGyIaJi/stXTg8z9ztt PwltpPkzU6cm53SIDnDpG4irFdAa+6MIaWZVyYttNl8+LcEC61UbiZgRFzTTbvmTOwBo YHNg== Received: by 10.66.80.66 with SMTP id p2mr102677232pax.84.1351697526831; Wed, 31 Oct 2012 08:32:06 -0700 (PDT) Received: from yakj.usersys.redhat.com (93-34-169-1.ip50.fastwebnet.it. [93.34.169.1]) by mx.google.com with ESMTPS id sz6sm2445230pbc.52.2012.10.31.08.32.03 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 31 Oct 2012 08:32:05 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Wed, 31 Oct 2012 16:30:32 +0100 Message-Id: <1351697456-16107-16-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1351697456-16107-1-git-send-email-pbonzini@redhat.com> References: <1351697456-16107-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.220.45 Cc: aliguori@us.ibm.com, stefanha@redhat.com Subject: [Qemu-devel] [PATCH v2 15/39] vl: init main loop earlier X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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");