From eb882e2304b5ff0e03b9a7908aafa459adff5f4e Mon Sep 17 00:00:00 2001
From: Miroslav Rezanina <mrezanin@redhat.com>
Date: Thu, 18 Dec 2014 06:27:49 +0100
Subject: Use kvm by default

Bugzilla: 906185

RHEL uses kvm accelerator by default, if available.

Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>

Rebase note:
 - 2.2: Move code from vl.c to accel.c

diff --git a/accel.c b/accel.c
index 74e41da..89ad417 100644
--- a/accel.c
+++ b/accel.c
@@ -87,8 +87,8 @@ int configure_accelerator(MachineState *ms)
 
     p = qemu_opt_get(qemu_get_machine_opts(), "accel");
     if (p == NULL) {
-        /* Use the default "accelerator", tcg */
-        p = "tcg";
+        /* Use kvm accelerator by default, fail to tcg*/
+        p = "kvm:tcg";
     }
 
     while (!accel_initialised && *p != '\0') {