From 1321c76d96910c2c807207f3fdfeb560c598ca60 Mon Sep 17 00:00:00 2001 From: Jun Nakajima Date: Fri, 4 Mar 2011 17:17:45 -0800 Subject: 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 Signed-off-by: Yunhong Jiang Signed-off-by: Jun Nakajima --- Makefile.target | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Makefile.target') diff --git a/Makefile.target b/Makefile.target index 7b7c1bc..fa76ed7 100644 --- a/Makefile.target +++ b/Makefile.target @@ -170,6 +170,15 @@ LOCAL_SRC_FILES += \ LOCAL_SRC_FILES += fpu/softfloat-native.c endif +# compile KVM only if target is x86 on x86 Linux +ifeq ($(QEMU_HOST_TAG)-$(EMULATOR_TARGET_ARCH),linux-x86-x86) +# the following is to include linux/kvm.h +LOCAL_CFLAGS += -I /usr/include +LOCAL_SRC_FILES += \ + target-i386/kvm.c \ + kvm-all.c +endif + ############################################################################## # Memory-access checking support. # Memory access checker uses information collected by instrumented code in -- cgit v1.1