From patchwork Mon Jul 20 23:10:08 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 36419 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 n6KNANah021851 for ; Mon, 20 Jul 2009 23:10:25 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752418AbZGTXKW (ORCPT ); Mon, 20 Jul 2009 19:10:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754242AbZGTXKU (ORCPT ); Mon, 20 Jul 2009 19:10:20 -0400 Received: from mx2.redhat.com ([66.187.237.31]:53377 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752418AbZGTXKS (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 n6KNAI3t029387 for ; Mon, 20 Jul 2009 19:10:18 -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 n6KNAH08002962; Mon, 20 Jul 2009 19:10:17 -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 n6KNAGke028980; Mon, 20 Jul 2009 19:10:17 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH 1/9] require --enable-kvm Date: Mon, 20 Jul 2009 19:10:08 -0400 Message-Id: <1248131416-11272-2-git-send-email-glommer@redhat.com> In-Reply-To: <1248131416-11272-1-git-send-email-glommer@redhat.com> References: <1248131416-11272-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 Also following upstream behaviour, we exit if not able to service this request. As we target move forward on merging with qemu, this would have to happen. So make it sooner, rather than later Signed-off-by: Glauber Costa --- qemu-kvm.c | 2 +- vl.c | 6 ------ 2 files changed, 1 insertions(+), 7 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 3c892e6..db28126 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -37,7 +37,7 @@ #error libkvm: userspace and kernel version mismatch #endif -int kvm_allowed = 1; +int kvm_allowed = 0; int kvm_irqchip = 1; int kvm_pit = 1; int kvm_pit_reinject = 1; diff --git a/vl.c b/vl.c index b3df596..7701488 100644 --- a/vl.c +++ b/vl.c @@ -5434,13 +5434,11 @@ int main(int argc, char **argv, char **envp) break; #endif #ifdef CONFIG_KVM -#ifdef KVM_UPSTREAM case QEMU_OPTION_enable_kvm: kvm_allowed = 1; #ifdef CONFIG_KQEMU kqemu_allowed = 0; #endif -#endif break; case QEMU_OPTION_no_kvm: kvm_allowed = 0; @@ -5754,11 +5752,7 @@ int main(int argc, char **argv, char **envp) if (kvm_enabled()) { if (kvm_init(smp_cpus) < 0) { fprintf(stderr, "Could not initialize KVM, will disable KVM support\n"); -#ifdef NO_CPU_EMULATION - fprintf(stderr, "Compiled with --disable-cpu-emulation, exiting.\n"); exit(1); -#endif - kvm_allowed = 0; } } #endif