So here is another respin .. not so broken for everyone this time ;-)

Signed-off-by: Jerone Young <[EMAIL PROTECTED]>


diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -102,7 +102,7 @@ fi
 fi
 
 if [ "$arch" = "powerpc" ]; then
-    target_exec="ppcemb-softmmu"
+    target_exec="ppcemb_kvm-softmmu"
 fi
 
 #configure user dir
diff --git a/qemu/Makefile.target b/qemu/Makefile.target
--- a/qemu/Makefile.target
+++ b/qemu/Makefile.target
@@ -21,6 +21,9 @@ TARGET_BASE_ARCH:=ppc
 TARGET_BASE_ARCH:=ppc
 endif
 ifeq ($(TARGET_ARCH), ppcemb)
+TARGET_BASE_ARCH:=ppc
+endif
+ifeq ($(TARGET_ARCH), ppcemb_kvm)
 TARGET_BASE_ARCH:=ppc
 endif
 ifeq ($(TARGET_ARCH), sparc64)
@@ -179,11 +182,16 @@ all: $(PROGS)
 
 #########################################################
 # cpu emulator library
-LIBOBJS=exec.o kqemu.o translate-all.o cpu-exec.o\
-        translate.o op.o host-utils.o
+LIBOBJS=exec.o kqemu.o cpu-exec.o\
+        host-utils.o
+
+ifneq ($(NO_TCG), 1)
 # TCG code generator
 LIBOBJS+= tcg/tcg.o tcg/tcg-dyngen.o tcg/tcg-runtime.o
 CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
+LIBOBJS+=translate-all.o op.o translate.o
+endif
+
 ifeq ($(USE_KVM), 1)
 LIBOBJS+=qemu-kvm.o
 endif
@@ -214,6 +222,7 @@ LIBOBJS+= op_helper.o helper.o
 LIBOBJS+= op_helper.o helper.o
 ifeq ($(USE_KVM), 1)
 LIBOBJS+= qemu-kvm-powerpc.o
+LIBOBJS+= fake-exec.o
 endif
 endif
 
diff --git a/qemu/configure b/qemu/configure
--- a/qemu/configure
+++ b/qemu/configure
@@ -547,7 +547,7 @@ if test -z "$target_list" ; then
 if test -z "$target_list" ; then
 # these targets are portable
     if [ "$softmmu" = "yes" ] ; then
-        target_list="i386-softmmu sparc-softmmu x86_64-softmmu mips-softmmu 
mipsel-softmmu mips64-softmmu mips64el-softmmu arm-softmmu ppc-softmmu 
ppcemb-softmmu ppc64-softmmu m68k-softmmu sh4-softmmu sh4eb-softmmu 
cris-softmmu"
+        target_list="i386-softmmu sparc-softmmu x86_64-softmmu mips-softmmu 
mipsel-softmmu mips64-softmmu mips64el-softmmu arm-softmmu ppc-softmmu 
ppcemb-softmmu ppc64-softmmu m68k-softmmu sh4-softmmu sh4eb-softmmu 
cris-softmmu ppcemb_kvm-softmmu"
     fi
 # the following are Linux specific
     if [ "$linux_user" = "yes" ] ; then
@@ -1027,6 +1027,7 @@ target_bigendian="no"
 [ "$target_cpu" = "sparc32plus" ] && target_bigendian=yes
 [ "$target_cpu" = "ppc" ] && target_bigendian=yes
 [ "$target_cpu" = "ppcemb" ] && target_bigendian=yes
+[ "$target_cpu" = "ppcemb_kvm" ] && target_bigendian=yes
 [ "$target_cpu" = "ppc64" ] && target_bigendian=yes
 [ "$target_cpu" = "ppc64abi32" ] && target_bigendian=yes
 [ "$target_cpu" = "mips" ] && target_bigendian=yes
@@ -1149,6 +1150,15 @@ elif test "$target_cpu" = "ppcemb" ; the
   echo "#define TARGET_ARCH \"ppcemb\"" >> $config_h
   echo "#define TARGET_PPC 1" >> $config_h
   echo "#define TARGET_PPCEMB 1" >> $config_h
+elif test "$target_cpu" = "ppcemb_kvm"; then
+  echo "TARGET_ARCH=ppcemb_kvm" >> $config_mak
+  echo "TARGET_ABI_DIR=ppc" >> $config_mak
+  echo "#define TARGET_ARCH \"ppcemb\" " >> $config_h
+  echo "#define TARGET_PPC 1" >> $config_h
+  echo "#define TARGET_PPCEMB 1" >> $config_h
+  echo "#define TARGET_PPCEMB_KVM 1" >> $config_h
+  echo "#define NO_TCG 1" >> $config_h
+  echo "NO_TCG=1" >> $config_mak
   configure_kvm
 elif test "$target_cpu" = "ppc64" ; then
   echo "TARGET_ARCH=ppc64" >> $config_mak
diff --git a/qemu/exec.c b/qemu/exec.c
--- a/qemu/exec.c
+++ b/qemu/exec.c
@@ -35,7 +35,11 @@
 
 #include "cpu.h"
 #include "exec-all.h"
+
+#ifndef NO_TCG 
 #include "tcg-target.h"
+#endif
+
 #include "qemu-kvm.h"
 #if defined(CONFIG_USER_ONLY)
 #include <qemu.h>
diff --git a/qemu/fake-exec.c b/qemu/fake-exec.c
new file mode 100644
--- /dev/null
+++ b/qemu/fake-exec.c
@@ -0,0 +1,62 @@
+#include <stdarg.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <inttypes.h>
+
+#include "cpu.h"
+#include "exec-all.h"
+
+int code_copy_enabled = 0;
+
+void cpu_dump_state (CPUState *env, FILE *f,
+                     int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
+                     int flags)
+{
+}
+
+void ppc_cpu_list (FILE *f, int (*cpu_fprintf)(FILE *f, const char *fmt, ...))
+{
+}
+
+void cpu_dump_statistics (CPUState *env, FILE*f,
+                          int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
+                          int flags)
+{
+}
+
+unsigned long code_gen_max_block_size(void)
+{
+    return 32;
+}
+
+void cpu_gen_init(void)
+{
+}
+
+int cpu_restore_state(TranslationBlock *tb,
+                      CPUState *env, unsigned long searched_pc,
+                      void *puc)
+
+{
+    return 0;
+}
+
+int cpu_ppc_gen_code(CPUState *env, TranslationBlock *tb, int 
*gen_code_size_ptr)
+{
+    return 0;
+}
+
+const ppc_def_t *cpu_ppc_find_by_name (const unsigned char *name)
+{
+    return NULL;
+}
+
+int cpu_ppc_register_internal (CPUPPCState *env, const ppc_def_t *def)
+{
+    return 0;
+}
+
+void flush_icache_range(unsigned long start, unsigned long stop)
+{
+}



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to