From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ae7TH-0004y8-Sa for qemu-devel@nongnu.org; Thu, 10 Mar 2016 15:46:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ae7TE-0005DI-L5 for qemu-devel@nongnu.org; Thu, 10 Mar 2016 15:46:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ae7TE-0005DA-FK for qemu-devel@nongnu.org; Thu, 10 Mar 2016 15:46:08 -0500 References: <20160309195208.11580.57085.stgit@gimli.home> <20160309195328.11580.953.stgit@gimli.home> <56E0C5D5.2010903@linaro.org> <20160310093408.7a76ed94@t450s.home> From: Eric Blake Message-ID: <56E1DD0E.5060901@redhat.com> Date: Thu, 10 Mar 2016 13:46:06 -0700 MIME-Version: 1.0 In-Reply-To: <20160310093408.7a76ed94@t450s.home> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ONKDiva1MAn0ReN9HJhIEX1XLweh29kRt" Subject: Re: [Qemu-devel] [PULL 3/8] vfio: Generalize region support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson , Eric Auger Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ONKDiva1MAn0ReN9HJhIEX1XLweh29kRt Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 03/10/2016 09:34 AM, Alex Williamson wrote: >>> + trace_vfio_msix_fixup(vdev->vbasedev.name, >>> + vdev->msix->table_bar, region->mmaps[0= ].offset, >>> + region->mmaps[0].offset + region->mmap= s[0].size); =20 >> Sorry this does not compile for me on arm 32b: >> >> ./trace/generated-tracers.h:16113:23: error: format =E2=80=98%lx=E2=80= =99 expects >> argument of type =E2=80=98long unsigned int=E2=80=99, but argument 8 h= as type =E2=80=98off_t=E2=80=99 >> [-Werror=3Dformat=3D] , name, bar, offset, size); >> >> -> vfio_msix_fixup(const char *name, int bar, off_t start, off_t end) = " =20 >> (%s) MSI-X region %d mmap fixup [0x%"PRIx64" - 0x%"PRIx64"]" ? >=20 > vfio_msix_disable(const char *name) " (%s)" > -vfio_msix_fixup(const char *name, int bar, off_t offset, size_t size) = " (%s) MSI-X region %d mmap fixup [0x%lx - 0x%lx]" > +vfio_msix_fixup(const char *name, int bar, off_t start, off_t end) " (= %s) MSI-X region %d mmap fixup [0x%"PRIx64" - 0x%"PRIx64"]" off_t and PRIx64 are not necessarily compatible types (on a 64-bit platform, one could be 'long' while the other is 'long long'). And even though we set compiler flags to get 64-bit off_t on 32-bit platforms, your code is not portable to people that don't set those flags and are stuck with 32-bit off_t. It may be better to declare start and end as [u]int64_t, rather than off_= t. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ONKDiva1MAn0ReN9HJhIEX1XLweh29kRt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJW4d0OAAoJEKeha0olJ0NqZR0H/0PE4QhNZ2G4sTMK25sqb9nf JcYoNEgwfusV1r1gWf80tLqAn3wQYoHJd5qWR9JcpSQHKbT4wGthRScnDu5A5y80 UQk5xCX2RA5fONUZ7gT+SVmnAW/QrHY2eBMjqeFJv/PV53zkPFmLe+rrukrxDXPA Ys/BT4Qu4paJNmYUvJij+vWPbxzt+nPmxAJCjATi5A7P7AvN6ME04BHiIFRwE/L7 IqmSOCbqK903hPxOB0+dBki21F6WB7gFK6s47vWOAS3nXFJt8NyPPK9Tur8pjOC8 nsKEUh18EuoeKfPfm32uZeTnYyu/YtMZ98o9BhNnoWcfORFBz0GPMMOzEUg+4gs= =4MjT -----END PGP SIGNATURE----- --ONKDiva1MAn0ReN9HJhIEX1XLweh29kRt--