From patchwork Fri Aug 5 08:50:29 2011 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: 1037712 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p758ojlS006702 for ; Fri, 5 Aug 2011 08:50:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755265Ab1HEIum (ORCPT ); Fri, 5 Aug 2011 04:50:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54025 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751402Ab1HEIum (ORCPT ); Fri, 5 Aug 2011 04:50:42 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p758ogaP025122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 5 Aug 2011 04:50:42 -0400 Received: from t500wlan.home.berrange.com.com (vpn1-4-8.ams2.redhat.com [10.36.4.8]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p758oeZZ023400; Fri, 5 Aug 2011 04:50:40 -0400 From: "Daniel P. Berrange" To: kvm@vger.kernel.org Cc: avi@redhat.com, mtosatti@redhat.com, "Daniel P. Berrange" Subject: [PATCH master+STABLE-0.15] Fix default accelerator when configured with --disable-kvm Date: Fri, 5 Aug 2011 09:50:29 +0100 Message-Id: <1312534229-15368-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 05 Aug 2011 08:50:45 +0000 (UTC) From: "Daniel P. Berrange" 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 * vl.c: Default to 'tcg' unless CONFIG_KVM is defined Signed-off-by: Daniel P. Berrange --- vl.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 7ae549e..28fd2f3 100644 --- a/vl.c +++ b/vl.c @@ -1953,8 +1953,13 @@ static int configure_accelerator(void) } if (p == NULL) { +#ifdef CONFIG_KVM /* Use the default "accelerator", kvm */ p = "kvm"; +#else + /* Use the default "accelerator", tcg */ + p = "tcg"; +#endif } while (!accel_initalised && *p != '\0') {