From mboxrd@z Thu Jan 1 00:00:00 1970 From: "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> Cc: avi@redhat.com, mtosatti@redhat.com, "Daniel P. Berrange" To: kvm@vger.kernel.org Return-path: 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 Sender: kvm-owner@vger.kernel.org List-ID: 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') { -- 1.7.6