From: Glauber Costa 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> References: <1248131416-11272-1-git-send-email-glommer@redhat.com> Cc: avi@redhat.com To: kvm@vger.kernel.org Return-path: 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 In-Reply-To: <1248131416-11272-1-git-send-email-glommer@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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 -- 1.6.2.2