Thanks for your comments It is the revised one >From 1a30adfc5ded3608ac2f09499b42234cf7d54a19 Mon Sep 17 00:00:00 2001 From: Anthony Xu <anthony.xu@xxxxxxxxx> Date: Fri, 20 Jun 2008 10:45:13 -0400 Subject: [PATCH] Make qemu compile for kvm-ia64 Since merging with Qemu upsteram, it can't be compiled for kvm-ia64 Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx> --- qemu/Makefile.target | 8 +++++++- qemu/cpu-exec.c | 2 ++ qemu/exec.c | 2 ++ qemu/target-ia64/cpu.h | 3 --- qemu/target-ia64/exec.h | 5 +++++ qemu/target-ia64/fake-exec.c | 6 ++++++ 6 files changed, 22 insertions(+), 4 deletions(-) diff --git a/qemu/Makefile.target b/qemu/Makefile.target index ac5eda1..a1491d0 100644 --- a/qemu/Makefile.target +++ b/qemu/Makefile.target @@ -201,8 +201,10 @@ ifdef CONFIG_DYNGEN_OP LIBOBJS+=op.o endif # TCG code generator +ifneq ($(TARGET_ARCH), ia64) LIBOBJS+= tcg/tcg.o tcg/tcg-dyngen.o tcg/tcg-runtime.o CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH) +endif ifeq ($(ARCH),sparc64) CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc endif @@ -239,7 +241,11 @@ LIBOBJS+= qemu-kvm-powerpc.o endif endif -LIBOBJS+= op_helper.o helper.o +LIBOBJS+= op_helper.o + +ifneq ($(TARGET_ARCH), ia64) +LIBOBJS+= helper.o +endif ifeq ($(TARGET_BASE_ARCH), arm) LIBOBJS+= neon_helper.o iwmmxt_helper.o diff --git a/qemu/cpu-exec.c b/qemu/cpu-exec.c index 252927f..e8d1cce 100644 --- a/qemu/cpu-exec.c +++ b/qemu/cpu-exec.c @@ -21,7 +21,9 @@ #define CPU_NO_GLOBAL_REGS #include "exec.h" #include "disas.h" +#if !defined(TARGET_IA64) #include "tcg.h" +#endif #if !defined(CONFIG_SOFTMMU) #undef EAX diff --git a/qemu/exec.c b/qemu/exec.c index 37a956b..544b963 100644 --- a/qemu/exec.c +++ b/qemu/exec.c @@ -37,7 +37,9 @@ #include "exec-all.h" #include "qemu-common.h" +#if !defined(TARGET_IA64) #include "tcg.h" +#endif #include "qemu-kvm.h" #if defined(CONFIG_USER_ONLY) diff --git a/qemu/target-ia64/cpu.h b/qemu/target-ia64/cpu.h index f8e5e8a..12718f5 100644 --- a/qemu/target-ia64/cpu.h +++ b/qemu/target-ia64/cpu.h @@ -43,9 +43,6 @@ #include "softfloat.h" typedef struct CPUIA64State { CPU_COMMON; - /* exception/interrupt handling */ - jmp_buf jmp_env; - int exception_index; int interrupt_request; int user_mode_only; diff --git a/qemu/target-ia64/exec.h b/qemu/target-ia64/exec.h index 155cfa6..db1149a 100644 --- a/qemu/target-ia64/exec.h +++ b/qemu/target-ia64/exec.h @@ -26,6 +26,8 @@ uint32_t T0; uint32_t T1; uint32_t T2; +#define tcg_qemu_tb_exec(tb_ptr) 0 + static inline void env_to_regs(void) { } @@ -34,6 +36,9 @@ static inline void regs_to_env(void) { } +void tcg_dump_info(FILE *f, + int (*cpu_fprintf)(FILE *f, const char *fmt, ...)); + void cpu_lock(void); void cpu_unlock(void); void cpu_loop_exit(void); diff --git a/qemu/target-ia64/fake-exec.c b/qemu/target-ia64/fake-exec.c index 0be4ffd..b6bd2cf 100644 --- a/qemu/target-ia64/fake-exec.c +++ b/qemu/target-ia64/fake-exec.c @@ -33,6 +33,12 @@ int cpu_ia64_gen_code(CPUState *env, TranslationBlock *tb, int *gen_code_size_pt return 0; } +void tcg_dump_info(FILE *f, + int (*cpu_fprintf)(FILE *f, const char *fmt, ...)) +{ + return; +} + void flush_icache_range(unsigned long start, unsigned long stop) { while (start < stop) { -- 1.5.5 Avi Kivity wrote: > Xu, Anthony wrote: >> From 7b2c2612b21b895cd14e632fea845c03b6e1dedc Mon Sep 17 00:00:00 >> 2001 From: Anthony Xu <anthony.xu@xxxxxxxxx> >> Date: Thu, 29 May 2008 13:14:56 -0400 >> Subject: [PATCH] Make qemu compile for kvm-ia64 >> >> Since merging with Qemu upsteram, it can't be compiled >> for kvm-ia64 >> >> @@ -620,7 +622,10 @@ int cpu_exec(CPUState *env1) >> env = cpu_single_env; >> #define env cpu_single_env >> #endif >> + >> +#if !defined(TARGET_IA64) >> next_tb = tcg_qemu_tb_exec(tc_ptr); +#endif >> > > Instead of sprinkling all those ifdefs, how about proving stubs > instead? It will reduce the merge overhead, and will be easier to fix > if/when tcg can target ia64.
Attachment:
0001-Make-qemu-compile-for-kvm-ia64.patch
Description: 0001-Make-qemu-compile-for-kvm-ia64.patch