From patchwork Tue Jul 28 20:52:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 37898 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 n6SKr5jL012795 for ; Tue, 28 Jul 2009 20:53:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754228AbZG1Uw4 (ORCPT ); Tue, 28 Jul 2009 16:52:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754123AbZG1Uw4 (ORCPT ); Tue, 28 Jul 2009 16:52:56 -0400 Received: from mx2.redhat.com ([66.187.237.31]:40559 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754033AbZG1Uwz (ORCPT ); Tue, 28 Jul 2009 16:52:55 -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 n6SKquh0007680 for ; Tue, 28 Jul 2009 16:52:56 -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 n6SKqtgK025335; Tue, 28 Jul 2009 16:52:55 -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 n6SKqsmb025731; Tue, 28 Jul 2009 16:52:54 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH] exit if we fail to initialize kvm Date: Tue, 28 Jul 2009 16:52:54 -0400 Message-Id: <1248814374-7953-1-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 Falling back to tcg has proven to be evil through time. The option is to do not try to act behind user's back, and quit the program completely if we fail to initialize kvm. Right now, the only way to run tcg from our tree becomes explicitly asking for it, with the -no-kvm option. But it will change when upstream accepts the --accel option. Signed-off-by: Glauber Costa --- vl.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 30c4ff9..cab62cb 100644 --- a/vl.c +++ b/vl.c @@ -5926,12 +5926,8 @@ int main(int argc, char **argv, char **envp) ret = kvm_init(smp_cpus); if (ret < 0) { -#if defined(KVM_UPSTREAM) || defined(NO_CPU_EMULATION) fprintf(stderr, "failed to initialize KVM\n"); exit(1); -#endif - fprintf(stderr, "Could not initialize KVM, will disable KVM support\n"); - kvm_allowed = 0; } }