On Tue, 2008-02-12 at 15:44 -0600, Anthony Liguori wrote: > Jerone Young wrote: > > 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 > > > > This is wrong and will break QEMU. > > You need to change the #define TARGET_PPCEMB to be something else like > TARGET_PPCEMB_KVM. Then you can change the above to > #if !defined(TARGET_PPCEMB_KVM) > > You can still generate a #define TARGET_PPCEMB too to keep other things > working.
I'll do this. But the issue here in upstream qemu this header is only defined under tcg/i386 & tcg/x86_64. So everyone else is out of luck. > > Likewise, the same is true in the Makefile. You can't conditionally > link against TCG if it's x86_64, you need to conditionally link if it's > anything but PPCEMB_KVM. The issue here is TCG is only for x86-64 & i386. No one else can use it. Is everyone else supposed to work then? > > Regards, > > Anthony Liguori > ------------------------------------------------------------------------- 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
