public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm also need to workaround changes about tcg code
@ 2008-02-15  3:17 Zhang, Xiantao
  2008-02-17  9:42 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang, Xiantao @ 2008-02-15  3:17 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel, kvm-ia64-devel

[-- Attachment #1: Type: text/plain, Size: 2259 bytes --]

From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Fri, 15 Feb 2008 10:50:22 +0800
Subject: [PATCH] qemu: IA64 also need to workaround tcg code.
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 qemu/dyngen.c                |    1 -
 qemu/hw/ipf.c                |    1 -
 qemu/target-ia64/fake-exec.c |   44
++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 2 deletions(-)
 create mode 100644 qemu/target-ia64/fake-exec.c

diff --git a/qemu/dyngen.c b/qemu/dyngen.c
index e5122e3..146d4ec 100644
--- a/qemu/dyngen.c
+++ b/qemu/dyngen.c
@@ -2767,7 +2767,6 @@ fprintf(outfile,
 "    uint8_t *arm_pool_ptr = gen_code_buf + 0x1000000;\n");
 #endif
 #ifdef HOST_IA64
-#error broken
     {
 	long addend, not_first = 0;
 	unsigned long sym_idx;
diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c
index ce67715..8c5304d 100644
--- a/qemu/hw/ipf.c
+++ b/qemu/hw/ipf.c
@@ -37,7 +37,6 @@
 #include "boards.h"
 #include "firmware.h"
 #include "ia64intrin.h"
-#include "dyngen.h"
 #include <unistd.h>
 
 #include "qemu-kvm.h"
diff --git a/qemu/target-ia64/fake-exec.c b/qemu/target-ia64/fake-exec.c
new file mode 100644
index 0000000..0be4ffd
--- /dev/null
+++ b/qemu/target-ia64/fake-exec.c
@@ -0,0 +1,44 @@
+/*
+ * fake-exec.c for ia64.
+ *
+ * This is a file for stub functions so that compilation is possible
+ * when TCG CPU emulation is disabled during compilation.
+ *
+ * Copyright 2007 IBM Corporation.
+ * Added by & Authors:
+ * 	Jerone Young <jyoung5@us.ibm.com>
+ *
+ * Copyright 2008 Intel Corporation.
+ * Added by Xiantao Zhang <xiantao.zhang@intel.com>
+ *
+ * This work is licensed under the GNU GPL licence version 2 or later.
+ *
+ */
+#include "exec.h"
+#include "cpu.h"
+
+int code_copy_enabled = 0;
+
+void cpu_gen_init(void)
+{
+}
+
+unsigned long code_gen_max_block_size(void)
+{
+    return 32;
+}
+
+int cpu_ia64_gen_code(CPUState *env, TranslationBlock *tb, int
*gen_code_size_ptr)
+{
+    return 0;
+}
+
+void flush_icache_range(unsigned long start, unsigned long stop)
+{
+    while (start < stop) {
+	asm volatile ("fc %0" :: "r"(start));
+	start += 32;
+    }
+    asm volatile (";;sync.i;;srlz.i;;");
+}
+
-- 
1.5.2

[-- Attachment #2: 0001-qemu-IA64-also-need-to-workaround-tcg-code.patch --]
[-- Type: application/octet-stream, Size: 2242 bytes --]

From 5a6d824a3c1b9dff67ad6f6c46375a37e42f8d66 Mon Sep 17 00:00:00 2001
From: Xiantao Zhang <xiantao.zhang@intel.com>
Date: Fri, 15 Feb 2008 10:50:22 +0800
Subject: [PATCH] qemu: IA64 also need to workaround tcg code.
Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com>
---
 qemu/dyngen.c                |    1 -
 qemu/hw/ipf.c                |    1 -
 qemu/target-ia64/fake-exec.c |   44 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 2 deletions(-)
 create mode 100644 qemu/target-ia64/fake-exec.c

diff --git a/qemu/dyngen.c b/qemu/dyngen.c
index e5122e3..146d4ec 100644
--- a/qemu/dyngen.c
+++ b/qemu/dyngen.c
@@ -2767,7 +2767,6 @@ fprintf(outfile,
 "    uint8_t *arm_pool_ptr = gen_code_buf + 0x1000000;\n");
 #endif
 #ifdef HOST_IA64
-#error broken
     {
 	long addend, not_first = 0;
 	unsigned long sym_idx;
diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c
index ce67715..8c5304d 100644
--- a/qemu/hw/ipf.c
+++ b/qemu/hw/ipf.c
@@ -37,7 +37,6 @@
 #include "boards.h"
 #include "firmware.h"
 #include "ia64intrin.h"
-#include "dyngen.h"
 #include <unistd.h>
 
 #include "qemu-kvm.h"
diff --git a/qemu/target-ia64/fake-exec.c b/qemu/target-ia64/fake-exec.c
new file mode 100644
index 0000000..0be4ffd
--- /dev/null
+++ b/qemu/target-ia64/fake-exec.c
@@ -0,0 +1,44 @@
+/*
+ * fake-exec.c for ia64.
+ *
+ * This is a file for stub functions so that compilation is possible
+ * when TCG CPU emulation is disabled during compilation.
+ *
+ * Copyright 2007 IBM Corporation.
+ * Added by & Authors:
+ * 	Jerone Young <jyoung5@us.ibm.com>
+ *
+ * Copyright 2008 Intel Corporation.
+ * Added by Xiantao Zhang <xiantao.zhang@intel.com>
+ *
+ * This work is licensed under the GNU GPL licence version 2 or later.
+ *
+ */
+#include "exec.h"
+#include "cpu.h"
+
+int code_copy_enabled = 0;
+
+void cpu_gen_init(void)
+{
+}
+
+unsigned long code_gen_max_block_size(void)
+{
+    return 32;
+}
+
+int cpu_ia64_gen_code(CPUState *env, TranslationBlock *tb, int *gen_code_size_ptr)
+{
+    return 0;
+}
+
+void flush_icache_range(unsigned long start, unsigned long stop)
+{
+    while (start < stop) {
+	asm volatile ("fc %0" :: "r"(start));
+	start += 32;
+    }
+    asm volatile (";;sync.i;;srlz.i;;");
+}
+
-- 
1.5.2


[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
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/

[-- Attachment #4: Type: text/plain, Size: 158 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kvm also need to workaround changes about tcg code
  2008-02-15  3:17 [PATCH] kvm also need to workaround changes about tcg code Zhang, Xiantao
@ 2008-02-17  9:42 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-02-17  9:42 UTC (permalink / raw)
  To: Zhang, Xiantao; +Cc: kvm-devel, kvm-ia64-devel

Zhang, Xiantao wrote:
> From: Xiantao Zhang <xiantao.zhang@intel.com>
> Date: Fri, 15 Feb 2008 10:50:22 +0800
> Subject: [PATCH] qemu: IA64 also need to workaround tcg code.
>   


Applied, thanks.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-------------------------------------------------------------------------
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/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-17  9:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-15  3:17 [PATCH] kvm also need to workaround changes about tcg code Zhang, Xiantao
2008-02-17  9:42 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox