So the recent code in qemu cvs has problem powerpc. So what I have done
is mainly work around this in the build system, by creating
ppcemb_kvm-sofmmu target. Along with this is a fake-exec.c that stubs
out the functions that are no longer defined (something done by Anthony
Liguori attempting to fix qemu_cvs). What do folks think about this
approach, for us all we really need is a qemu that is not built with tcg
dependency.
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,22 +182,26 @@ 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
+
+CPPFLAGS+=-I$(SRC_PATH)
+
+ifeq ($(USE_KVM), 1)
+LIBOBJS+=qemu-kvm.o
+endif
+ifdef CONFIG_SOFTFLOAT
+LIBOBJS+=fpu/softfloat.o
+else
+LIBOBJS+=fpu/softfloat-native.o
+endif
+CPPFLAGS+=-I$(SRC_PATH)/fpu
+
+ifeq ($(TARGET_ARCH), i386)
# 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)
-ifeq ($(USE_KVM), 1)
-LIBOBJS+=qemu-kvm.o
-endif
-ifdef CONFIG_SOFTFLOAT
-LIBOBJS+=fpu/softfloat.o
-else
-LIBOBJS+=fpu/softfloat-native.o
-endif
-CPPFLAGS+=-I$(SRC_PATH)/fpu
-
-ifeq ($(TARGET_ARCH), i386)
+LIBOBJS+=translate-all.o op.o translate.o
LIBOBJS+=helper.o helper2.o
ifeq ($(USE_KVM), 1)
LIBOBJS+=qemu-kvm-x86.o kvm-tpr-opt.o
@@ -203,6 +210,10 @@ endif
endif
ifeq ($(TARGET_ARCH), x86_64)
+# 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
LIBOBJS+=helper.o helper2.o
ifeq ($(USE_KVM), 1)
LIBOBJS+=qemu-kvm-x86.o kvm-tpr-opt.o
@@ -214,6 +225,9 @@ 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
+else
+LIBOBJS+=translate-all.o op.o translate.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,12 @@ 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_mak
+ echo "#define TARGET_PPC 1" >> $config_h
+ echo "#define TARGET_PPCEMB 1" >> $config_h
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"
+
+#if defined(TARGET_i386) || defined(TARGET_X86_64)
#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
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel