From patchwork Thu Aug 4 14:02:24 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: 1035802 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 p74E2dII011197 for ; Thu, 4 Aug 2011 14:02:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754133Ab1HDOCg (ORCPT ); Thu, 4 Aug 2011 10:02:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44612 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751570Ab1HDOCg (ORCPT ); Thu, 4 Aug 2011 10:02:36 -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 p74E2Zfs023405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 4 Aug 2011 10:02:36 -0400 Received: from t500wlan.home.berrange.com.com (vpn1-7-228.ams2.redhat.com [10.36.7.228]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p74E2XVY032269; Thu, 4 Aug 2011 10:02:34 -0400 From: "Daniel P. Berrange" To: kvm@vger.kernel.org Cc: avi@redhat.com, "Daniel P. Berrange" Subject: [PATCH master+STABLE-0.15] Fix default accelerator when configured with --disable-kvm Date: Thu, 4 Aug 2011 15:02:24 +0100 Message-Id: <1312466544-5011-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]); Thu, 04 Aug 2011 14:02:39 +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 --- 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') {