From patchwork Fri Jul 6 15:41:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 1166591 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BD28A3FE80 for ; Fri, 6 Jul 2012 15:43:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757640Ab2GFPno (ORCPT ); Fri, 6 Jul 2012 11:43:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28462 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757589Ab2GFPnn (ORCPT ); Fri, 6 Jul 2012 11:43:43 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q66FheK2013155 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 6 Jul 2012 11:43:40 -0400 Received: from lettuce.camlab.fab.redhat.com (lettuce.camlab.fab.redhat.com [10.33.15.20] (may be forged)) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q66FhbMr017114; Fri, 6 Jul 2012 11:43:38 -0400 From: "Daniel P. Berrange" To: kvm@vger.kernel.org Cc: Jan Kiszka , Avi Kivity , Marcelo Tosatti , "Richard W.M. Jones" , Serge Hallyn , "Daniel P. Berrange" Subject: [PATCH] Fix default accelerator when building with --disable-kvm Date: Fri, 6 Jul 2012 16:41:59 +0100 Message-Id: <1341589319-23202-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: "Daniel P. Berrange" The following commit commit 3ad763fcba5bd0ec5a79d4a9b6baeef119dd4a3d Author: Jan Kiszka Date: Fri Mar 2 10:30:43 2012 +0100 qemu-kvm: Use machine options to configure qemu-kvm defaults Upstream is moving towards this mechanism, so start using it in qemu-kvm already to configure the specific defaults: kvm enabled on, just like in-kernel irqchips. prevents qemu from starting when it has been build with the --disable-kvm argument, because the accelerator is hardcoded to 'kvm'. This is a regression previously fixed by commit ce967f6610dcd7b7762dbad5a639fecf42d5c76d Author: Daniel P. Berrange Date: Fri Aug 5 09:50:29 2011 +0100 Fix default accelerator when configured with --disable-kvm The default accelerator is hardcoded to 'kvm'. This is a fine default for qemu-kvm normally, but if the user built with ./configure --disable-kvm, then the resulting binaries will not work by default The fix is again to make this conditional on CONFIG_KVM_OPTIONS Signed-off-by: Daniel P. Berrange --- hw/pc_piix.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 98a06fa..35202dd 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -360,7 +360,9 @@ static QEMUMachine pc_machine_v1_2 = { .init = pc_init_pci, .max_cpus = 255, .is_default = 1, +#ifdef CONFIG_KVM_OPTIONS .default_machine_opts = "accel=kvm,kernel_irqchip=on", +#endif }; #define PC_COMPAT_1_1 \ @@ -469,7 +471,9 @@ static QEMUMachine pc_machine_v0_14 = { .desc = "Standard PC", .init = pc_init_pci, .max_cpus = 255, +#ifdef CONFIG_KVM_OPTIONS .default_machine_opts = "accel=kvm,kernel_irqchip=on", +#endif .compat_props = (GlobalProperty[]) { PC_COMPAT_0_14, { @@ -503,7 +507,9 @@ static QEMUMachine pc_machine_v0_13 = { .desc = "Standard PC", .init = pc_init_pci_no_kvmclock, .max_cpus = 255, +#ifdef CONFIG_KVM_OPTIONS .default_machine_opts = "accel=kvm,kernel_irqchip=on", +#endif .compat_props = (GlobalProperty[]) { PC_COMPAT_0_13, { @@ -541,7 +547,9 @@ static QEMUMachine pc_machine_v0_12 = { .desc = "Standard PC", .init = pc_init_pci_no_kvmclock, .max_cpus = 255, +#ifdef CONFIG_KVM_OPTIONS .default_machine_opts = "accel=kvm,kernel_irqchip=on", +#endif .compat_props = (GlobalProperty[]) { PC_COMPAT_0_12, { @@ -575,7 +583,9 @@ static QEMUMachine pc_machine_v0_11 = { .desc = "Standard PC, qemu 0.11", .init = pc_init_pci_no_kvmclock, .max_cpus = 255, +#ifdef CONFIG_KVM_OPTIONS .default_machine_opts = "accel=kvm,kernel_irqchip=on", +#endif .compat_props = (GlobalProperty[]) { PC_COMPAT_0_11, { @@ -597,7 +607,9 @@ static QEMUMachine pc_machine_v0_10 = { .desc = "Standard PC, qemu 0.10", .init = pc_init_pci_no_kvmclock, .max_cpus = 255, +#ifdef CONFIG_KVM_OPTIONS .default_machine_opts = "accel=kvm,kernel_irqchip=on", +#endif .compat_props = (GlobalProperty[]) { PC_COMPAT_0_11, { @@ -631,7 +643,9 @@ static QEMUMachine isapc_machine = { .desc = "ISA-only PC", .init = pc_init_isa, .max_cpus = 1, +#ifdef CONFIG_KVM_OPTIONS .default_machine_opts = "accel=kvm,kernel_irqchip=on", +#endif .compat_props = (GlobalProperty[]) { { .driver = "pc-sysfw",