From: Zhang Xiantao <[EMAIL PROTECTED]>
Date: Wed, 5 Dec 2007 11:30:21 +0800
Subject: [PATCH] kvm/ia64: qemu: Add op_helper.c for ia64.

Add op_helper.c for ia64.
Signed-off-by: Zhang Xiantao <[EMAIL PROTECTED]>
---
 qemu/target-ia64/op_helper.c |  109
++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 109 insertions(+), 0 deletions(-)
 create mode 100644 qemu/target-ia64/op_helper.c

diff --git a/qemu/target-ia64/op_helper.c b/qemu/target-ia64/op_helper.c
new file mode 100644
index 0000000..f432d37
--- /dev/null
+++ b/qemu/target-ia64/op_helper.c
@@ -0,0 +1,109 @@
+/*
+ * op_helper.c:  IA64 emulation cpu micro-operations helpers for qemu.
+ *
+ * Copyright (c) 2007 Intel Corporation
+ * Zhang Xiantao <[EMAIL PROTECTED]>
+ * 
+ * This program is free software; you can redistribute it and/or modify
it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but
WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
along with
+ * this program; if not, write to the Free Software Foundation, Inc.,
59 Temple
+ * Place - Suite 330, Boston, MA 02111-1307 USA.
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "cpu.h"
+#include "exec-all.h"
+
+extern int kvm_allowed;
+
+CPUState *cpu_ia64_init(void){
+    CPUState *env;
+    env = qemu_mallocz(sizeof(CPUState));
+    if (!env)
+        return NULL;
+    cpu_exec_init(env);
+    cpu_reset(env);
+#ifdef USE_KVM
+    {
+        if (kvm_allowed) {
+            kvm_qemu_init_env(env);
+            env->ready_for_interrupt_injection = 1;
+        }
+    }
+#endif    
+    return env;
+}
+
+void cpu_reset(CPUIA64State *env)
+{
+}
+
+
+static inline void set_feature(CPUIA64State *env, int feature)
+{
+  
+}
+
+void cpu_ia64_set_model(CPUIA64State *env, uint32_t id)
+{
+}
+
+void cpu_ia64_close(CPUIA64State *env)
+{
+    free(env);
+}
+
+
+extern int semihosting_enabled;
+
+
+void switch_mode(CPUState *env, int mode)
+{
+}
+
+/* Handle a CPU exception.  */
+void do_interrupt(CPUIA64State *env)
+{
+#ifdef USE_KVM
+    if (kvm_allowed) {
+       printf("%s: unexpect\n", __FUNCTION__);
+       exit(-1);
+    }
+#endif
+}
+
+
+
+int cpu_ia64_handle_mmu_fault (CPUState *env, target_ulong address,
+                              int access_type, int is_user, int
is_softmmu)
+{
+    return 1;
+}
+
+target_ulong cpu_get_phys_page_debug(CPUState *env, target_ulong addr)
+{
+    return -1;
+}
+
+
+void cpu_dump_state(CPUState *env, FILE *f, 
+                    int (*cpu_fprintf)(FILE *f, const char *fmt, ...),
+                    int flags)
+{
+       return;
+}
+void tlb_fill (target_ulong addr, int is_write, int is_user, void
*retaddr)
+{
+    return ;
+}
+
-- 
1.5.2

Attachment: 0014-kvm-ia64-qemu-Add-op_helper.c-for-ia64.patch
Description: 0014-kvm-ia64-qemu-Add-op_helper.c-for-ia64.patch

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to