* [PATCH] make qemu compile for kvm/ia64
@ 2008-06-18 5:41 Xu, Anthony
2008-06-18 13:42 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Xu, Anthony @ 2008-06-18 5:41 UTC (permalink / raw)
To: kvm, kvm-ia64
[-- Attachment #1: Type: text/plain, Size: 3051 bytes --]
>From 7b2c2612b21b895cd14e632fea845c03b6e1dedc Mon Sep 17 00:00:00 2001
From: Anthony Xu <anthony.xu@intel.com>
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
Signed-off-by: Anthony Xu < anthony.xu@intel.com >
---
qemu/Makefile.target | 8 +++++++-
qemu/cpu-exec.c | 5 +++++
qemu/exec.c | 4 ++++
qemu/target-ia64/cpu.h | 3 ---
4 files changed, 16 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..b61e9aa 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
@@ -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
env->current_tb = NULL;
/* reset soft MMU for next block (it can currently
only be set by a memory fault) */
diff --git a/qemu/exec.c b/qemu/exec.c
index 37a956b..3dd49b5 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)
@@ -3197,7 +3199,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);
+#if !defined(TARGET_IA64)
tcg_dump_info(f, cpu_fprintf);
+#endif
}
#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;
--
1.5.5
[-- Attachment #2: 0001-Make-qemu-compile-for-kvm-ia64.patch --]
[-- Type: application/octet-stream, Size: 2941 bytes --]
From 7b2c2612b21b895cd14e632fea845c03b6e1dedc Mon Sep 17 00:00:00 2001
From: Anthony Xu <anthony.xu@intel.com>
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
Signed-off-by: Anthony Xu < anthony.xu@intel.com >
---
qemu/Makefile.target | 8 +++++++-
qemu/cpu-exec.c | 5 +++++
qemu/exec.c | 4 ++++
qemu/target-ia64/cpu.h | 3 ---
4 files changed, 16 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..b61e9aa 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
@@ -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
env->current_tb = NULL;
/* reset soft MMU for next block (it can currently
only be set by a memory fault) */
diff --git a/qemu/exec.c b/qemu/exec.c
index 37a956b..3dd49b5 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)
@@ -3197,7 +3199,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);
+#if !defined(TARGET_IA64)
tcg_dump_info(f, cpu_fprintf);
+#endif
}
#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;
--
1.5.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] make qemu compile for kvm/ia64
2008-06-18 5:41 [PATCH] make qemu compile for kvm/ia64 Xu, Anthony
@ 2008-06-18 13:42 ` Avi Kivity
2008-06-20 2:55 ` Xu, Anthony
0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2008-06-18 13:42 UTC (permalink / raw)
To: Xu, Anthony; +Cc: kvm, kvm-ia64
Xu, Anthony wrote:
> From 7b2c2612b21b895cd14e632fea845c03b6e1dedc Mon Sep 17 00:00:00 2001
> From: Anthony Xu <anthony.xu@intel.com>
> 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.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] make qemu compile for kvm/ia64
2008-06-18 13:42 ` Avi Kivity
@ 2008-06-20 2:55 ` Xu, Anthony
2008-06-25 11:43 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Xu, Anthony @ 2008-06-20 2:55 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm, kvm-ia64
[-- Attachment #1: Type: text/plain, Size: 4310 bytes --]
Thanks for your comments
It is the revised one
>From 1a30adfc5ded3608ac2f09499b42234cf7d54a19 Mon Sep 17 00:00:00 2001
From: Anthony Xu <anthony.xu@intel.com>
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@intel.com>
---
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@intel.com>
>> 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 #2: 0001-Make-qemu-compile-for-kvm-ia64.patch --]
[-- Type: application/octet-stream, Size: 3348 bytes --]
From 1a30adfc5ded3608ac2f09499b42234cf7d54a19 Mon Sep 17 00:00:00 2001
From: Anthony Xu <anthony.xu@intel.com>
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@intel.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] make qemu compile for kvm/ia64
2008-06-20 2:55 ` Xu, Anthony
@ 2008-06-25 11:43 ` Avi Kivity
0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2008-06-25 11:43 UTC (permalink / raw)
To: Xu, Anthony; +Cc: kvm, kvm-ia64
Xu, Anthony wrote:
> Thanks for your comments
> It is the revised one
>
>
> From 1a30adfc5ded3608ac2f09499b42234cf7d54a19 Mon Sep 17 00:00:00 2001
> From: Anthony Xu <anthony.xu@intel.com>
> 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
>
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-06-25 11:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-18 5:41 [PATCH] make qemu compile for kvm/ia64 Xu, Anthony
2008-06-18 13:42 ` Avi Kivity
2008-06-20 2:55 ` Xu, Anthony
2008-06-25 11:43 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox