>From olaf@xxxxxxxxx Thu Jan 12 13:53:15 2012 Received: from SMTP.EU.CITRIX.COM (10.31.1.27) by LONPMAILMX02.citrite.net (10.30.203.163) with Microsoft SMTP Server id 8.3.213.0; Thu, 12 Jan 2012 13:53:15 +0000 Received: from mo-p00-ob.rzone.de ([81.169.146.161]) by SMTP.EU.CITRIX.COM with ESMTP/TLS/EDH-RSA-DES-CBC3-SHA; 12 Jan 2012 13:53:15 +0000 Received: from probook.site (dslb-088-065-110-122.pools.arcor-ip.net [88.65.110.122]) by smtp.strato.de (fruni mo6) (RZmta 27.3 DYNA|AUTH) with (EDH-RSA-DES-CBC3-SHA encrypted) ESMTPA id z02699o0CDYeUs ; Thu, 12 Jan 2012 14:52:52 +0100 (MET) Received: from probook.site (localhost [IPv6:::1]) by probook.site (Postfix) with ESMTP id CB15318634; Thu, 12 Jan 2012 14:52:51 +0100 (CET) From: Olaf Hering To: "xen-devel@xxxxxxxxxxxxxxxxxxx" CC: George Dunlap Date: Thu, 12 Jan 2012 13:52:51 +0000 Subject: [PATCH] xenalyze: add missing casts to fix 64bit build Thread-Topic: [PATCH] xenalyze: add missing casts to fix 64bit build Thread-Index: AczRMYilUkKqxSPMTEShuD89quR++A== Message-ID: <94f71dded5ab5a31224b.1326376371@xxxxxxxxxxxx> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Exchange-Organization-AuthAs: Anonymous X-MS-Exchange-Organization-AuthSource: LONPMAILMX02.citrite.net X-MS-Has-Attach: X-MS-TNEF-Correlator: x-sbrs: 4.1 x-mesageid: 9971216 x-ironport-server: LONPIP01.CITRITE.NET x-remote-ip: 81.169.146.161 x-policy: $ACCEPTED x-ironport-anti-spam-filtered: true x-ironport-anti-spam-result: Av4BAC/lDk9RqZKhjWdsb2JhbABDrQkiAQEBAQkJCwkSBSKCIBMGOQE7FR8uM4d8pTeSBweJAYMcmlCMfw x-ironport-av: E=Sophos;i="4.71,498,1320624000"; d="scan'208";a="9971216" dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1326376394; l=2969; s=domk; d=aepfle.de; h=Cc:To:From:Date:Subject:Content-Transfer-Encoding:MIME-Version: Content-Type:X-RZG-CLASS-ID:X-RZG-AUTH; bh=X6Rg3zN9hR3a7o+4QJ3b3HFlrL4=; b=RcH7lQSvp2kGDWRXGFz1E40PbfO1PoHdjMME7T8HAdtB1mqhT6K6IWFhRHH+Hf4OGtU xcWSK9jxQs13YdFzUOVXZhXnodRlFPorCXKzZ2Hikbs9qrZR7F0qT2V1XFzHzdEPRK1kR Tt2x7tJWIqguMAx/Jx/Ve4IOxfrAeOmyBIk= user-agent: Mercurial-patchbomb/1.7.5 x-rzg-class-id: mo00 x-rzg-auth: :P2EQZWCpfu+qG7CngxMFH1J+zrwiavkK6tmQaLfmztM8TOFPjzMQEiX0jA== x-mercurial-node: 94f71dded5ab5a31224b852aac6b238b590b7b25 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-Evolution-Source: imap://georged@xxxxxxxxxxxxxxxxxxxxxxxx/ Content-Transfer-Encoding: 8bit # HG changeset patch # User Olaf Hering # Date 1326374876 -3600 # Node ID 94f71dded5ab5a31224b852aac6b238b590b7b25 # Parent 223e8ad4c7557960e29a7c294bb94723b2cd7f09 xenalyze: Use long to cast into and out of pointers 64-bit compileers will complain when casting into our out of a pointer if the integer is not of the same size; so make all things which are cast into or out of pointers "long", which translates to 32-bit on 32-bit systems and 64-bit on 64-bit systems. Reported-by: Olaf Hering Signed-off-by: George Dunlap diff -r 223e8ad4c755 xenalyze.c --- a/xenalyze.c Mon Nov 28 16:16:23 2011 +0000 +++ b/xenalyze.c Thu Jan 26 12:25:31 2012 +0000 @@ -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; + long reason=(long)data; PRINT_SUMMARY(h->summary.mmio[reason], " mmio "); @@ -3733,7 +3733,7 @@ void hvm_mmio_summary(struct hvm_data *h void hvm_mmio_assist_postprocess(struct hvm_data *h) { - int reason; + long reason; switch(h->exit_reason) { @@ -4248,10 +4248,10 @@ void hvm_cr3_write_summary(struct hvm_da void hvm_cr_write_summary(struct hvm_data *h, void *data) { - int cr=(int)data; + long cr=(long)data; PRINT_SUMMARY(h->summary.cr_write[cr], - " cr%d ", cr); + " cr%ld ", cr); if ( cr==3 ) hvm_cr3_write_summary(h); } @@ -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; + long evt = (long)data; assert(evt < HVM_EVENT_HANDLER_MAX); @@ -4808,7 +4808,7 @@ void hvm_generic_summary(struct hvm_data void hvm_generic_postprocess(struct hvm_data *h) { - int evt = 0; + long evt = 0; static unsigned registered[HVM_EVENT_HANDLER_MAX] = { 0 }; if ( h->inflight.generic.event ) @@ -4860,7 +4860,7 @@ void hvm_generic_postprocess(struct hvm_ static unsigned warned[HVM_EXIT_REASON_MAX] = { 0 }; if ( registered[evt] != h->exit_reason+1 && !warned[h->exit_reason]) { - fprintf(warn, "%s: HVM evt %x in %x and %x!\n", + fprintf(warn, "%s: HVM evt %lx in %x and %x!\n", __func__, evt, registered[evt]-1, h->exit_reason); warned[h->exit_reason]=1; }