aboutsummaryrefslogtreecommitdiffstats
path: root/kvm.h
diff options
context:
space:
mode:
authorJun Nakajima <jnakajim@gmail.com>2011-03-04 17:17:45 -0800
committerJun Nakajima <jnakajim@gmail.com>2011-03-04 17:17:45 -0800
commit1321c76d96910c2c807207f3fdfeb560c598ca60 (patch)
tree1f83d7f3bd12e3f8b6d80fcceee5eab21e10f0e5 /kvm.h
parent40ee75d90cdaaaec1006cbc91864b11dba09c351 (diff)
downloadexternal_qemu-1321c76d96910c2c807207f3fdfeb560c598ca60.zip
external_qemu-1321c76d96910c2c807207f3fdfeb560c598ca60.tar.gz
external_qemu-1321c76d96910c2c807207f3fdfeb560c598ca60.tar.bz2
x86: Enable KVM mode for Android x86 emulator (update/rebase)
This patch enables KVM mode on x86 Linux to boost performance of x86 emulaiton if the hardware-based virtualization feature is present on the host machine. Change-Id: I4b24474b3ec115a3b9a7bf017801f4f610253b09 Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Diffstat (limited to 'kvm.h')
-rw-r--r--kvm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/kvm.h b/kvm.h
index f5f5a55..e1fc986 100644
--- a/kvm.h
+++ b/kvm.h
@@ -18,6 +18,8 @@
#include "qemu-queue.h"
#ifdef CONFIG_KVM
+
+#ifdef TARGET_I386
extern int kvm_allowed;
#define kvm_enabled() (kvm_allowed)
@@ -25,6 +27,10 @@ extern int kvm_allowed;
#define kvm_enabled() (0)
#endif
+#else
+#define kvm_enabled() (0)
+#endif
+
struct kvm_run;
/* external API */