From patchwork Mon Apr 4 10:48:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 8739861 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7D399C0553 for ; Mon, 4 Apr 2016 10:51:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F4AB20259 for ; Mon, 4 Apr 2016 10:51:13 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AB1EA20272 for ; Mon, 4 Apr 2016 10:51:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1an24O-0002g7-4M; Mon, 04 Apr 2016 10:49:20 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1an24M-0002fy-Ji for xen-devel@lists.xenproject.org; Mon, 04 Apr 2016 10:49:18 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id 8A/05-07120-DA642075; Mon, 04 Apr 2016 10:49:17 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNIsWRWlGSWpSXmKPExsXitHRDpO5aN6Z wg2dbFSy+b5nM5MDocfjDFZYAxijWzLyk/IoE1ozZm5pZC75IVMzfc4C5gfGqcBcjJ4eEgL/E i8XfmEBsNgFdiUvTJjKD2LwCghInZz5hAbGZBXQkFuz+xAZhy0tsfzsHqIYDqMZB4vhhY5Awi 4CKxIp/U1m7GLk4RATmM0pc7dzMBFIjLGAk8WubB0gNp4CjxPSPX8FWCQlUSHz7OYER4gRjid X3P7KAlAsJqEnMXR8PYkoIcEv87bafwMg3C8k9s5DcMwvJPQsYmVcxqhenFpWlFuka6iUVZaZ nlOQmZuboGhqY6eWmFhcnpqfmJCYV6yXn525iBAYZAxDsYNz53OkQoyQHk5Io76J7jOFCfEn5 KZUZicUZ8UWlOanFhxj1ODgEzu25e4xRoO/zhEVMUix5+XmpShK8Ba5M4UKCRanpqRVpmTnAm IBpkODgURLhfQiS5i0uSMwtzkyHSJ1iVJQS5z0KkhAASWSU5sG1weLwEqOslDAvI9BpQjwFqU W5mSWo8q8YxTkYlYR5i0Cm8GTmlcBNfwW0mAlocb0w2OKSRISUVAOjdYWbq+4VhhMCdS3HsnY 51PDV/d+7n+PgHTPfadyLbh5+EXZyqq3l6tC5KucVX3KbTc4Rnb4n0nU606pOXc67rUu2bhW4 NufA6wuP3Y7NUlUUPFcePqNMe7fA+YsTVxxvnlCcG95z9btZg6OZ4w55jrx3JoLb38U8u5PJ0 Zi9bf8xrvTlrz+KK7EUZyQaajEXFScCADfrv02+AgAA X-Env-Sender: prvs=895d09049=Ian.Jackson@citrix.com X-Msg-Ref: server-11.tower-21.messagelabs.com!1459766955!7358845!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 16078 invoked from network); 4 Apr 2016 10:49:17 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-11.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 4 Apr 2016 10:49:17 -0000 X-IronPort-AV: E=Sophos;i="5.24,440,1454976000"; d="scan'208";a="344552669" From: Ian Jackson MIME-Version: 1.0 Message-ID: <22274.18075.802554.440487@mariner.uk.xensource.com> Date: Mon, 4 Apr 2016 11:48:59 +0100 To: Wei Liu , Xen-devel , Wen Congyang , Changlong Xie In-Reply-To: <22274.17952.386335.936490@mariner.uk.xensource.com> References: <1459557366-7091-1-git-send-email-wei.liu2@citrix.com> <22274.17952.386335.936490@mariner.uk.xensource.com> X-Mailer: VM 8.1.0 under 23.4.1 (i486-pc-linux-gnu) X-DLP: MIA1 Subject: Re: [Xen-devel] [PATCH] libxl: fix compilation on ARM X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Ian Jackson writes ("Re: [PATCH] libxl: fix compilation on ARM"): > Following discussion on irc, here is a v2: I forgot to update the commit message. Ian. From 4cbc583020642d6c333d07e297c52594bb88b542 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 4 Apr 2016 11:41:19 +0100 Subject: [PATCH] libxl: ARM build: fix type of libxl__srm_callout_callback_restore_results COLO introduced a few callbacks. The original implementation used unsigned long for a type which in fact should be xen_pfn_t. That broke libxl compilation on ARM, because xen_pfn_t is not a synonym for unsigned long on ARM platform. Fixing this requires modifying the perl script: specifically now we need to include xenctrl.h before _libxl_save_msgs_*.h, rather than afterwards, so that we can use xen_pfn_t there. Reported-by: Olaf Hering Signed-off-by: Wei Liu Signed-off-by: Ian Jackson Acked-by: Wei Liu --- tools/libxl/libxl_create.c | 4 ++-- tools/libxl/libxl_save_msgs_gen.pl | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 6882ff8..4b02de9 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -1109,8 +1109,8 @@ static void domcreate_bootloader_done(libxl__egc *egc, domcreate_stream_done(egc, &dcs->srs, rc); } -void libxl__srm_callout_callback_restore_results(unsigned long store_mfn, - unsigned long console_mfn, void *user) +void libxl__srm_callout_callback_restore_results(xen_pfn_t store_mfn, + xen_pfn_t console_mfn, void *user) { libxl__save_helper_state *shs = user; libxl__domain_create_state *dcs = shs->caller_state; diff --git a/tools/libxl/libxl_save_msgs_gen.pl b/tools/libxl/libxl_save_msgs_gen.pl index c2243f2..3ae7373 100755 --- a/tools/libxl/libxl_save_msgs_gen.pl +++ b/tools/libxl/libxl_save_msgs_gen.pl @@ -29,8 +29,8 @@ our @msgs = ( [ 6, 'srcxA', "wait_checkpoint", [] ], [ 7, 'scxA', "switch_qemu_logdirty", [qw(int domid unsigned enable)] ], - [ 8, 'rcx', "restore_results", ['unsigned long', 'store_gfn', - 'unsigned long', 'console_gfn'] ], + [ 8, 'rcx', "restore_results", ['xen_pfn_t', 'store_gfn', + 'xen_pfn_t', 'console_gfn'] ], [ 9, 'srW', "complete", [qw(int retval int errnoval)] ], ); @@ -70,9 +70,9 @@ END_BOTH END_CALLOUT -#include "_libxl_save_msgs_${ah}.h" #include #include +#include "_libxl_save_msgs_${ah}.h" END_HELPER } @@ -141,7 +141,7 @@ static void bytes_put(unsigned char *const buf, int *len, END -foreach my $simpletype (qw(int uint16_t uint32_t unsigned), 'unsigned long') { +foreach my $simpletype (qw(int uint16_t uint32_t unsigned), 'unsigned long', 'xen_pfn_t') { my $typeid = typeid($simpletype); $out_body{'callout'} .= <