From patchwork Mon Jul 20 23:10:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 36421 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6KNARA5021865 for ; Mon, 20 Jul 2009 23:10:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754315AbZGTXKZ (ORCPT ); Mon, 20 Jul 2009 19:10:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754326AbZGTXKX (ORCPT ); Mon, 20 Jul 2009 19:10:23 -0400 Received: from mx2.redhat.com ([66.187.237.31]:53379 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753258AbZGTXKS (ORCPT ); Mon, 20 Jul 2009 19:10:18 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6KNAJGv029395 for ; Mon, 20 Jul 2009 19:10:19 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6KNAI2h002968; Mon, 20 Jul 2009 19:10:18 -0400 Received: from localhost.localdomain (virtlab1.virt.bos.redhat.com [10.16.72.21]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6KNAGkg028980; Mon, 20 Jul 2009 19:10:17 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH 3/9] change order of kvm_init call. Date: Mon, 20 Jul 2009 19:10:10 -0400 Message-Id: <1248131416-11272-4-git-send-email-glommer@redhat.com> In-Reply-To: <1248131416-11272-3-git-send-email-glommer@redhat.com> References: <1248131416-11272-1-git-send-email-glommer@redhat.com> <1248131416-11272-2-git-send-email-glommer@redhat.com> <1248131416-11272-3-git-send-email-glommer@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The goal is to get rid of the call to kvm_init. But those things are subtle, and often break. So do it in a separate patch, to help finding potential issues in future bisections. Signed-off-by: Glauber Costa --- vl.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vl.c b/vl.c index f4e4d0f..86a6d70 100644 --- a/vl.c +++ b/vl.c @@ -5748,15 +5748,6 @@ int main(int argc, char **argv, char **envp) signal(SIGTTIN, SIG_IGN); } -#ifdef CONFIG_KVM - if (kvm_enabled()) { - if (kvm_init(smp_cpus) < 0) { - fprintf(stderr, "Could not initialize KVM, will disable KVM support\n"); - exit(1); - } - } -#endif - if (pid_file && qemu_create_pidfile(pid_file) != 0) { if (daemonize) { uint8_t status = 1; @@ -5956,6 +5947,15 @@ int main(int argc, char **argv, char **envp) } #endif +#ifdef CONFIG_KVM + if (kvm_enabled()) { + if (kvm_init(smp_cpus) < 0) { + fprintf(stderr, "Could not initialize KVM, will disable KVM support\n"); + exit(1); + } + } +#endif + if (monitor_device) { monitor_hd = qemu_chr_open("monitor", monitor_device, NULL); if (!monitor_hd) {