Patchwork [06/11] kvm, x86: use target_phys_addr_t

login
register
mail settings
Submitter Jin Dongming
Date Oct. 14, 2010, 8:48 a.m.
Message ID <4CB6C3D9.2070807@np.css.fujitsu.com>
Download mbox | patch
Permalink /patch/67798/
State New
Headers show

Comments

Jin Dongming - Oct. 14, 2010, 8:48 a.m.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Tested-by: Jin Dongming <jin.dongming@np.css.fujitsu.com>
---
 qemu-kvm.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

Patch

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 0ba42fc..89ae524 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -1163,7 +1163,7 @@  static void kvm_do_set_mce(CPUState *env, struct kvm_x86_mce *mce,
     }
 }
 
-static void kvm_mce_inj_srar_dataload(CPUState *env, unsigned long paddr)
+static void kvm_mce_inj_srar_dataload(CPUState *env, target_phys_addr_t paddr)
 {
     struct kvm_x86_mce mce = {
         .bank = 9,
@@ -1178,7 +1178,7 @@  static void kvm_mce_inj_srar_dataload(CPUState *env, unsigned long paddr)
     kvm_do_set_mce(env, &mce, 1);
 }
 
-static void kvm_mce_inj_srao_memscrub(CPUState *env, unsigned long paddr)
+static void kvm_mce_inj_srao_memscrub(CPUState *env, target_phys_addr_t paddr)
 {
     struct kvm_x86_mce mce = {
         .bank = 9,
@@ -1193,7 +1193,7 @@  static void kvm_mce_inj_srao_memscrub(CPUState *env, unsigned long paddr)
     kvm_do_set_mce(env, &mce, 1);
 }
 
-static void kvm_mce_inj_srao_broadcast(unsigned long paddr)
+static void kvm_mce_inj_srao_broadcast(target_phys_addr_t paddr)
 {
     struct kvm_x86_mce mce_srao_memscrub = {
         .bank = 9,
@@ -1227,12 +1227,12 @@  static void sigbus_handler(int n, struct qemu_signalfd_siginfo *siginfo,
         && siginfo->ssi_code == BUS_MCEERR_AO) {
         void *vaddr;
         ram_addr_t ram_addr;
-        unsigned long paddr;
+        target_phys_addr_t paddr;
 
         /* Hope we are lucky for AO MCE */
         vaddr = (void *)(intptr_t)siginfo->ssi_addr;
         if (do_qemu_ram_addr_from_host(vaddr, &ram_addr) ||
-            !kvm_physical_memory_addr_from_ram(kvm_state, ram_addr, (target_phys_addr_t *)&paddr)) {
+            !kvm_physical_memory_addr_from_ram(kvm_state, ram_addr, &paddr)) {
             fprintf(stderr, "Hardware memory error for memory used by "
                     "QEMU itself instead of guest system!: %llx\n",
                     (unsigned long long)siginfo->ssi_addr);
@@ -1382,7 +1382,7 @@  static void kvm_on_sigbus(CPUState *env, siginfo_t *siginfo)
 #if defined(KVM_CAP_MCE) && defined(TARGET_I386)
     void *vaddr;
     ram_addr_t ram_addr;
-    unsigned long paddr;
+    target_phys_addr_t paddr;
 
     if ((env->mcg_cap & MCG_SER_P) && siginfo->si_addr
         && (siginfo->si_code == BUS_MCEERR_AR
@@ -1396,7 +1396,7 @@  static void kvm_on_sigbus(CPUState *env, siginfo_t *siginfo)
         }
         vaddr = (void *)siginfo->si_addr;
         if (do_qemu_ram_addr_from_host(vaddr, &ram_addr) ||
-            !kvm_physical_memory_addr_from_ram(kvm_state, ram_addr, (target_phys_addr_t *)&paddr)) {
+            !kvm_physical_memory_addr_from_ram(kvm_state, ram_addr, &paddr)) {
             fprintf(stderr, "Hardware memory error for memory used by "
                     "QEMU itself instead of guest system!\n");
             /* Hope we are lucky for AO MCE */