From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60206) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeETR-0002B9-7f for qemu-devel@nongnu.org; Thu, 10 Mar 2016 23:14:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeETM-0003UR-9E for qemu-devel@nongnu.org; Thu, 10 Mar 2016 23:14:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36398) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeETM-0003UN-3j for qemu-devel@nongnu.org; Thu, 10 Mar 2016 23:14:44 -0500 Date: Thu, 10 Mar 2016 21:14:40 -0700 From: Alex Williamson Message-ID: <20160310211440.638b9ae1@t450s.home> In-Reply-To: <56E1DD0E.5060901@redhat.com> References: <20160309195208.11580.57085.stgit@gimli.home> <20160309195328.11580.953.stgit@gimli.home> <56E0C5D5.2010903@linaro.org> <20160310093408.7a76ed94@t450s.home> <56E1DD0E.5060901@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PULL 3/8] vfio: Generalize region support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, Eric Auger On Thu, 10 Mar 2016 13:46:06 -0700 Eric Blake wrote: > On 03/10/2016 09:34 AM, Alex Williamson wrote: >=20 > >>> + 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); > >> =20 > >> -> 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 > > =20 >=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"]" =20 >=20 > 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. >=20 > It may be better to declare start and end as [u]int64_t, rather than off_= t. Looks like we need another respin anyway, and uint64_t works just as well here. Done. Thanks, Alex