diff mbox

[master+STABLE-0.15] Fix default accelerator when configured with --disable-kvm

Message ID 1312534229-15368-1-git-send-email-berrange@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel P. Berrangé Aug. 5, 2011, 8:50 a.m. UTC
From: "Daniel P. Berrange" <berrange@redhat.com>

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 <berrange@redhat.com>
---
 vl.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Comments

Marcelo Tosatti Aug. 5, 2011, 5:10 p.m. UTC | #1
On Fri, Aug 05, 2011 at 09:50:29AM +0100, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@redhat.com>
> 
> 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 <berrange@redhat.com>

Applied, thanks.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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') {