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

[Xen-devel] [PATCH] xenalyze: add missing casts to fix 64bit build



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1326374876 -3600
# Node ID 94f71dded5ab5a31224b852aac6b238b590b7b25
# Parent  223e8ad4c7557960e29a7c294bb94723b2cd7f09
xenalyze: add missing casts to fix 64bit build

xenalyze.c: In function 'hvm_mmio_summary':
xenalyze.c:3728: error: cast from pointer to integer of different size
xenalyze.c: In function 'hvm_mmio_assist_postprocess':
xenalyze.c:3743: error: cast to pointer from integer of different size
xenalyze.c:3747: error: cast to pointer from integer of different size
xenalyze.c:3759: error: cast to pointer from integer of different size
xenalyze.c: In function 'hvm_cr_write_summary':
xenalyze.c:4251: error: cast from pointer to integer of different size
xenalyze.c: In function 'hvm_generic_summary':
xenalyze.c:4800: error: cast from pointer to integer of different size
xenalyze.c: In function 'hvm_generic_postprocess':
xenalyze.c:4871: error: cast to pointer from integer of different size
make: *** [xenalyze] Error 1

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

diff -r 223e8ad4c755 -r 94f71dded5ab xenalyze.c
--- a/xenalyze.c
+++ b/xenalyze.c
@@ -3725,7 +3725,7 @@ void enumerate_mmio(struct hvm_data *h)
 
 void hvm_mmio_summary(struct hvm_data *h, void *data)
 {
-    int reason=(int)data;
+    int reason=(long)data;
 
     PRINT_SUMMARY(h->summary.mmio[reason],
                   "   mmio ");
@@ -3740,11 +3740,11 @@ void hvm_mmio_assist_postprocess(struct 
     case VMEXIT_NPF:
     case EXIT_REASON_EPT_VIOLATION:
         reason=NONPF_MMIO_NPF;
-        hvm_set_summary_handler(h, hvm_mmio_summary, (void *)reason);
+        hvm_set_summary_handler(h, hvm_mmio_summary, (void *)(long)reason);
         break;
     case EXIT_REASON_APIC_ACCESS:
         reason=NONPF_MMIO_APIC;
-        hvm_set_summary_handler(h, hvm_mmio_summary, (void *)reason);
+        hvm_set_summary_handler(h, hvm_mmio_summary, (void *)(long)reason);
         break;
     default:
     {
@@ -3756,7 +3756,7 @@ void hvm_mmio_assist_postprocess(struct 
             warned=1;
         }
         reason=NONPF_MMIO_UNKNOWN;
-        hvm_set_summary_handler(h, hvm_mmio_summary, (void *)reason);
+        hvm_set_summary_handler(h, hvm_mmio_summary, (void *)(long)reason);
         break;
     }
     }
@@ -4248,7 +4248,7 @@ void hvm_cr3_write_summary(struct hvm_da
 
 void hvm_cr_write_summary(struct hvm_data *h, void *data)
 {
-    int cr=(int)data;
+    int cr=(long)data;
 
     PRINT_SUMMARY(h->summary.cr_write[cr],
                   "   cr%d ", cr);
@@ -4797,7 +4797,7 @@ void hvm_rdtsc_process(struct record_inf
 
 void hvm_generic_summary(struct hvm_data *h, void *data)
 {
-    int evt = (int)data;
+    int evt = (long)data;
 
     assert(evt < HVM_EVENT_HANDLER_MAX);
 
@@ -4868,7 +4868,7 @@ void hvm_generic_postprocess(struct hvm_
         else
         {
             int ret;
-            if((ret=__hvm_set_summary_handler(h, hvm_generic_summary, (void 
*)evt)))
+            if((ret=__hvm_set_summary_handler(h, hvm_generic_summary, (void 
*)(long)evt)))
                 fprintf(stderr, "%s: hvm_set_summary_handler returned %d\n",
                         __func__, ret);
             registered[evt]=h->exit_reason+1;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.