From: Jes Sorensen <jes@sgi.com>
To: kvm-ia64@vger.kernel.org
Subject: [patch] fix build breakage of qemu/kvm on ia64
Date: Thu, 02 Oct 2008 15:37:08 +0000 [thread overview]
Message-ID: <48E4EAA4.4060305@sgi.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
Hi,
This one cleans up some problems with how the ia64 headers declared
'env' and also included stdio.h in cpu.h.
It builds and still boots kvm on my test system :-)
Cheers,
Jes
[-- Attachment #2: 0200-qemu-ia64-build-fix.patch --]
[-- Type: text/plain, Size: 3303 bytes --]
Fix build problem with latest kvm-userspace.git on ia64:
- Declare 'env' properly as on all other architectures, instead of
having a local decleration in every object.
- Introduce kvm_arch_try_push_nmi()
- Remove and cleanup fallout from having stdio.h included in cpu.h
Signed-off-by: Jes Sorensen <jes@sgi.com>
---
qemu/qemu-kvm-ia64.c | 5 +++++
qemu/target-ia64/cpu.h | 6 +-----
qemu/target-ia64/exec.h | 10 ++++++++++
qemu/target-ia64/fake-exec.c | 2 ++
qemu/target-ia64/firmware.c | 1 +
5 files changed, 19 insertions(+), 5 deletions(-)
Index: kvm-userspace.git/qemu/qemu-kvm-ia64.c
===================================================================
--- kvm-userspace.git.orig/qemu/qemu-kvm-ia64.c
+++ kvm-userspace.git/qemu/qemu-kvm-ia64.c
@@ -57,6 +57,11 @@
return 1;
}
+int kvm_arch_try_push_nmi(void *opaque)
+{
+ return 1;
+}
+
void kvm_arch_update_regs_for_sipi(CPUState *env)
{
}
Index: kvm-userspace.git/qemu/target-ia64/cpu.h
===================================================================
--- kvm-userspace.git.orig/qemu/target-ia64/cpu.h
+++ kvm-userspace.git/qemu/target-ia64/cpu.h
@@ -26,7 +26,6 @@
#include "ia64intrin.h"
#include<string.h>
-#include<stdio.h>
#define TARGET_LONG_BITS 64
@@ -52,12 +51,9 @@
#define cpu_init cpu_ia64_init
#define cpu_signal_handler cpu_ia64_signal_handler
-struct CPUIA64State *env;
+extern struct CPUIA64State *env;
int cpu_get_pic_interrupt(CPUIA64State *s);
int cpu_exec(CPUState *env1);
-void cpu_dump_state(CPUState *env, FILE *f,
- int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
- int flags);
CPUState *cpu_ia64_init(const char * cpu_model);
static inline int cpu_mmu_index (CPUState *env)
Index: kvm-userspace.git/qemu/target-ia64/exec.h
===================================================================
--- kvm-userspace.git.orig/qemu/target-ia64/exec.h
+++ kvm-userspace.git/qemu/target-ia64/exec.h
@@ -18,13 +18,21 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#ifndef __IA64_H__
+#define __IA64_H__
+
//#include "dyngen-exec.h"
+#include "config.h"
+
+#include "dyngen-exec.h"
#include "cpu.h"
#include "exec-all.h"
#define tcg_qemu_tb_exec(tb_ptr) 0
+register struct CPUIA64State *env asm(AREG0);
+
static inline void env_to_regs(void)
{
}
@@ -45,3 +53,5 @@
return 0;
return EXCP_HALTED;
}
+
+#endif
Index: kvm-userspace.git/qemu/target-ia64/fake-exec.c
===================================================================
--- kvm-userspace.git.orig/qemu/target-ia64/fake-exec.c
+++ kvm-userspace.git/qemu/target-ia64/fake-exec.c
@@ -14,6 +14,8 @@
* This work is licensed under the GNU GPL licence version 2 or later.
*
*/
+#include <stdio.h>
+
#include "cpu.h"
#include "exec-all.h"
Index: kvm-userspace.git/qemu/target-ia64/firmware.c
===================================================================
--- kvm-userspace.git.orig/qemu/target-ia64/firmware.c
+++ kvm-userspace.git/qemu/target-ia64/firmware.c
@@ -21,6 +21,7 @@
#include <string.h>
#include <stdlib.h>
+#include <stdio.h>
#include <zlib.h>
#include <sys/types.h>
#include <sys/stat.h>
WARNING: multiple messages have this Message-ID (diff)
From: Jes Sorensen <jes@sgi.com>
To: Avi Kivity <avi@redhat.com>,
kvm-ia64@vger.kernel.org, kvm@vger.kernel.org, "Zhang,
Xiantao" <xiantao.zhang@intel.com>
Subject: [patch] fix build breakage of qemu/kvm on ia64
Date: Thu, 02 Oct 2008 17:37:08 +0200 [thread overview]
Message-ID: <48E4EAA4.4060305@sgi.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
Hi,
This one cleans up some problems with how the ia64 headers declared
'env' and also included stdio.h in cpu.h.
It builds and still boots kvm on my test system :-)
Cheers,
Jes
[-- Attachment #2: 0200-qemu-ia64-build-fix.patch --]
[-- Type: text/plain, Size: 3303 bytes --]
Fix build problem with latest kvm-userspace.git on ia64:
- Declare 'env' properly as on all other architectures, instead of
having a local decleration in every object.
- Introduce kvm_arch_try_push_nmi()
- Remove and cleanup fallout from having stdio.h included in cpu.h
Signed-off-by: Jes Sorensen <jes@sgi.com>
---
qemu/qemu-kvm-ia64.c | 5 +++++
qemu/target-ia64/cpu.h | 6 +-----
qemu/target-ia64/exec.h | 10 ++++++++++
qemu/target-ia64/fake-exec.c | 2 ++
qemu/target-ia64/firmware.c | 1 +
5 files changed, 19 insertions(+), 5 deletions(-)
Index: kvm-userspace.git/qemu/qemu-kvm-ia64.c
===================================================================
--- kvm-userspace.git.orig/qemu/qemu-kvm-ia64.c
+++ kvm-userspace.git/qemu/qemu-kvm-ia64.c
@@ -57,6 +57,11 @@
return 1;
}
+int kvm_arch_try_push_nmi(void *opaque)
+{
+ return 1;
+}
+
void kvm_arch_update_regs_for_sipi(CPUState *env)
{
}
Index: kvm-userspace.git/qemu/target-ia64/cpu.h
===================================================================
--- kvm-userspace.git.orig/qemu/target-ia64/cpu.h
+++ kvm-userspace.git/qemu/target-ia64/cpu.h
@@ -26,7 +26,6 @@
#include "ia64intrin.h"
#include<string.h>
-#include<stdio.h>
#define TARGET_LONG_BITS 64
@@ -52,12 +51,9 @@
#define cpu_init cpu_ia64_init
#define cpu_signal_handler cpu_ia64_signal_handler
-struct CPUIA64State *env;
+extern struct CPUIA64State *env;
int cpu_get_pic_interrupt(CPUIA64State *s);
int cpu_exec(CPUState *env1);
-void cpu_dump_state(CPUState *env, FILE *f,
- int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
- int flags);
CPUState *cpu_ia64_init(const char * cpu_model);
static inline int cpu_mmu_index (CPUState *env)
Index: kvm-userspace.git/qemu/target-ia64/exec.h
===================================================================
--- kvm-userspace.git.orig/qemu/target-ia64/exec.h
+++ kvm-userspace.git/qemu/target-ia64/exec.h
@@ -18,13 +18,21 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#ifndef __IA64_H__
+#define __IA64_H__
+
//#include "dyngen-exec.h"
+#include "config.h"
+
+#include "dyngen-exec.h"
#include "cpu.h"
#include "exec-all.h"
#define tcg_qemu_tb_exec(tb_ptr) 0
+register struct CPUIA64State *env asm(AREG0);
+
static inline void env_to_regs(void)
{
}
@@ -45,3 +53,5 @@
return 0;
return EXCP_HALTED;
}
+
+#endif
Index: kvm-userspace.git/qemu/target-ia64/fake-exec.c
===================================================================
--- kvm-userspace.git.orig/qemu/target-ia64/fake-exec.c
+++ kvm-userspace.git/qemu/target-ia64/fake-exec.c
@@ -14,6 +14,8 @@
* This work is licensed under the GNU GPL licence version 2 or later.
*
*/
+#include <stdio.h>
+
#include "cpu.h"
#include "exec-all.h"
Index: kvm-userspace.git/qemu/target-ia64/firmware.c
===================================================================
--- kvm-userspace.git.orig/qemu/target-ia64/firmware.c
+++ kvm-userspace.git/qemu/target-ia64/firmware.c
@@ -21,6 +21,7 @@
#include <string.h>
#include <stdlib.h>
+#include <stdio.h>
#include <zlib.h>
#include <sys/types.h>
#include <sys/stat.h>
next reply other threads:[~2008-10-02 15:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-02 15:37 Jes Sorensen [this message]
2008-10-02 15:37 ` [patch] fix build breakage of qemu/kvm on ia64 Jes Sorensen
2008-10-03 2:14 ` Zhang, Xiantao
2008-10-03 2:14 ` Zhang, Xiantao
2008-10-05 9:58 ` Avi Kivity
2008-10-05 9:58 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48E4EAA4.4060305@sgi.com \
--to=jes@sgi.com \
--cc=kvm-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.