[PATCH 23/24] Get CONFIG_CPU_EMULATION back to life

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 Makefile.target         |    6 ++++--
 configure               |    6 ++++--
 exec.c                  |    2 ++
 target-i386/fake-exec.c |    4 ----
 vl.c                    |    2 +-
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/Makefile.target b/Makefile.target
index 4a5352b..6846451 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 289459a..ee37ea1 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 dd8881c..aff9ec8 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 737286d..dfa202d 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 88bd3eb..5d4e18f 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
-- 
1.6.2.5

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

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux