aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2009-09-18 13:41:34 +0200
committerAvi Kivity <avi@redhat.com>2009-09-21 12:12:44 +0300
commit1da35753b4bb1e20a84763e500f2b1e5af066528 (patch)
treec01640c6d1eb99e6c029d6e0fe53bb2b8e0d4a55
parentqemu-kvm: Reindent pc_new_cpu (diff)
downloadqemu-kvm-1da35753b4bb1e20a84763e500f2b1e5af066528.tar.gz
qemu-kvm-1da35753b4bb1e20a84763e500f2b1e5af066528.tar.bz2
qemu-kvm-1da35753b4bb1e20a84763e500f2b1e5af066528.zip
Get CONFIG_CPU_EMULATION back to life
Code compile with --disable-cpu-emulation, and that don't compile tcg. This is the minimal set of changes to get it working Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--Makefile.target6
-rwxr-xr-xconfigure6
-rw-r--r--exec.c2
-rw-r--r--target-i386/fake-exec.c4
-rw-r--r--vl.c2
5 files changed, 11 insertions, 9 deletions
diff --git a/Makefile.target b/Makefile.target
index d2444ac9f..e2965b699 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -33,8 +33,10 @@ all: $(PROGS)
#########################################################
# cpu emulator library
-libobj-y = exec.o translate-all.o cpu-exec.o translate.o host-utils.o
-libobj-y += tcg/tcg.o tcg/tcg-runtime.o
+libobj-y = exec.o cpu-exec.o host-utils.o
+libobj-$(CONFIG_NO_CPU_EMULATION) += fake-exec.o
+libobj-$(CONFIG_CPU_EMULATION) += translate-all.o translate.o
+libobj-$(CONFIG_CPU_EMULATION) += tcg/tcg.o tcg/tcg-runtime.o
libobj-$(CONFIG_SOFTFLOAT) += fpu/softfloat.o
libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o
libobj-y += op_helper.o helper.o
diff --git a/configure b/configure
index f8d740230..6c6cb1340 100755
--- a/configure
+++ b/configure
@@ -2078,8 +2078,10 @@ fi
if test "$need_offsetof" = "yes" ; then
echo "CONFIG_NEED_OFFSETOF=y" >> $config_host_mak
fi
-if test $cpu_emulation = "no"; then
- echo "NO_CPU_EMULATION=1" >> $config_host_mak
+if test $cpu_emulation = "yes"; then
+ echo "CONFIG_CPU_EMULATION=y" >> $config_host_mak
+else
+ echo "CONFIG_NO_CPU_EMULATION=y" >> $config_host_mak
fi
# XXX: suppress that
diff --git a/exec.c b/exec.c
index dd8881cfe..aff9ec8c5 100644
--- a/exec.c
+++ b/exec.c
@@ -3795,7 +3795,9 @@ void dump_exec_info(FILE *f,
cpu_fprintf(f, "TB flush count %d\n", tb_flush_count);
cpu_fprintf(f, "TB invalidate count %d\n", tb_phys_invalidate_count);
cpu_fprintf(f, "TLB flush count %d\n", tlb_flush_count);
+#ifdef CONFIG_PROFILER
tcg_dump_info(f, cpu_fprintf);
+#endif
}
#if !defined(CONFIG_USER_ONLY)
diff --git a/target-i386/fake-exec.c b/target-i386/fake-exec.c
index 737286dce..dfa202d6a 100644
--- a/target-i386/fake-exec.c
+++ b/target-i386/fake-exec.c
@@ -45,10 +45,6 @@ int cpu_x86_gen_code(CPUState *env, TranslationBlock *tb, int *gen_code_size_ptr
return 0;
}
-void flush_icache_range(unsigned long start, unsigned long stop)
-{
-}
-
void optimize_flags_init(void)
{
}
diff --git a/vl.c b/vl.c
index 88bd3eb29..5d4e18fe1 100644
--- a/vl.c
+++ b/vl.c
@@ -5627,7 +5627,7 @@ int main(int argc, char **argv, char **envp)
ret = kvm_init(smp_cpus);
if (ret < 0) {
-#if defined(KVM_UPSTREAM) || defined(NO_CPU_EMULATION)
+#if defined(KVM_UPSTREAM) || defined(CONFIG_NO_CPU_EMULATION)
fprintf(stderr, "failed to initialize KVM\n");
exit(1);
#endif