[PATCH] [KVM] qemu: clean up the warning info

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
	please review it.
thanks

Best Regards
--yang

>From 9f0b7ec112299eb644df790113722bce561f3729 Mon Sep 17 00:00:00 2001
From: Yang Zhang <yang.zhang@xxxxxxxxx>
Date: Mon, 2 Mar 2009 02:25:43 -0500
Subject: [PATCH] [KVM] qemu: clean up the warning info

clean up the warning info in the ia64's code

Signed-off-by: Yang Zhang <yang.zhang@xxxxxxxxx>
---
 qemu/hw/ipf.c                |    7 +++----
 qemu/qemu-kvm-ia64.c         |    2 +-
 qemu/target-ia64/exec.h      |    1 -
 qemu/target-ia64/firmware.c  |    3 ++-
 qemu/target-ia64/firmware.h  |    2 +-
 qemu/target-ia64/op_helper.c |    6 ++++++
 6 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c
index 73dac18..5463628 100644
--- a/qemu/hw/ipf.c
+++ b/qemu/hw/ipf.c
@@ -387,7 +387,6 @@ static void ipf_init1(ram_addr_t ram_size, int vga_ram_size,
     PCIBus *pci_bus;
     int piix3_devfn = -1;
     CPUState *env;
-    NICInfo *nd;
     qemu_irq *cpu_irq;
     qemu_irq *i8259;
     int page_size;
@@ -487,7 +486,7 @@ static void ipf_init1(ram_addr_t ram_size, int vga_ram_size,
                 kvm_ia64_copy_from_nvram_to_GFW(nvram_fd, g_fw_start);
                 close(nvram_fd);
             }
-            i = atexit(kvm_ia64_copy_from_GFW_to_nvram);
+            i = atexit((void *)kvm_ia64_copy_from_GFW_to_nvram);
             if (i != 0)
                 fprintf(stderr, "cannot set exit function\n");
         }
@@ -671,8 +670,8 @@ static void ipf_init_pci(ram_addr_t ram_size, int vga_ram_size,
 QEMUMachine ipf_machine = {
     .name = "itanium",
     .desc = "Itanium Platform",
-    .init = ipf_init_pci,
-    .ram_require = VGA_RAM_SIZE + GFW_SIZE,
+    .init = (QEMUMachineInitFunc *)ipf_init_pci,
+    .ram_require = (ram_addr_t)(VGA_RAM_SIZE + GFW_SIZE),
     .max_cpus = 255,
 };
 
diff --git a/qemu/qemu-kvm-ia64.c b/qemu/qemu-kvm-ia64.c
index f9e4b4b..66e4232 100644
--- a/qemu/qemu-kvm-ia64.c
+++ b/qemu/qemu-kvm-ia64.c
@@ -8,9 +8,9 @@
 #include <libkvm.h>
 #include <pthread.h>
 #include <sys/utsname.h>
+#include <sys/io.h>
 
 
-extern kvm_context_t kvm_context;
 
 int kvm_arch_qemu_create_context(void)
 {
diff --git a/qemu/target-ia64/exec.h b/qemu/target-ia64/exec.h
index 0e6b9e8..37b64f7 100644
--- a/qemu/target-ia64/exec.h
+++ b/qemu/target-ia64/exec.h
@@ -45,7 +45,6 @@ void do_interrupt (CPUState *env);
 
 void cpu_lock(void);
 void cpu_unlock(void);
-void cpu_loop_exit(void);
 
 static inline int cpu_halted(CPUState *env) {
     /* handle exit of HALTED state */
diff --git a/qemu/target-ia64/firmware.c b/qemu/target-ia64/firmware.c
index 88fcaa8..87a8178 100644
--- a/qemu/target-ia64/firmware.c
+++ b/qemu/target-ia64/firmware.c
@@ -649,7 +649,8 @@ kvm_ia64_copy_from_nvram_to_GFW(unsigned long nvram_fd,
     struct stat file_stat;
     if ((fstat(nvram_fd, &file_stat) < 0) ||
         (NVRAM_SIZE  != file_stat.st_size) ||
-        (read(nvram_fd, fw_start + NVRAM_OFFSET, NVRAM_SIZE) != NVRAM_SIZE))
+        (read(nvram_fd, (void *)(fw_start + NVRAM_OFFSET),
+              NVRAM_SIZE) != NVRAM_SIZE))
         return -1;
     return 0;
 }
diff --git a/qemu/target-ia64/firmware.h b/qemu/target-ia64/firmware.h
index 47aaa1d..c1707ac 100644
--- a/qemu/target-ia64/firmware.h
+++ b/qemu/target-ia64/firmware.h
@@ -57,7 +57,7 @@ extern int kvm_ia64_build_hob(unsigned long memsize, unsigned long vcpus,
                               uint8_t *fw_start, unsigned long nvram_addr);
 extern char *read_image(const char *filename, unsigned long *size);
 
-extern int kvm_ia64_copy_from_GFW_to_nvram();
+extern int kvm_ia64_copy_from_GFW_to_nvram(void);
 extern int kvm_ia64_nvram_init(unsigned long type);
 extern int kvm_ia64_copy_from_nvram_to_GFW(unsigned long nvram_fd,
                                            const uint8_t *fw_start);
diff --git a/qemu/target-ia64/op_helper.c b/qemu/target-ia64/op_helper.c
index 78b32f9..d51525a 100644
--- a/qemu/target-ia64/op_helper.c
+++ b/qemu/target-ia64/op_helper.c
@@ -27,6 +27,12 @@
 #include "qemu-kvm.h"
 #include "qemu-common.h"
 
+void cpu_ia64_set_model(CPUIA64State *env, uint32_t id);
+void cpu_ia64_close(CPUIA64State *env);
+void switch_mode(CPUState *env, int mode);
+void do_interrupt(CPUIA64State *env);
+int cpu_ia64_handle_mmu_fault (CPUState *env, target_ulong address,
+                               int access_type, int is_user, int is_softmmu);
 CPUState *cpu_ia64_init(const char *cpu_model)
 {
     CPUState *env;
-- 
1.6.0.rc1

Attachment: 0001--KVM-qemu-clean-up-the-warning-info.patch
Description: 0001--KVM-qemu-clean-up-the-warning-info.patch


[Index of Archives]     [Linux KVM Devel]     [Linux Virtualization]     [Big List of Linux Books]     [Linux SCSI]     [Yosemite Forum]

  Powered by Linux