qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, Eric Auger <eric.auger@linaro.org>
Subject: Re: [Qemu-devel] [PULL 3/8] vfio: Generalize region support
Date: Thu, 10 Mar 2016 21:14:40 -0700	[thread overview]
Message-ID: <20160310211440.638b9ae1@t450s.home> (raw)
In-Reply-To: <56E1DD0E.5060901@redhat.com>

On Thu, 10 Mar 2016 13:46:06 -0700
Eric Blake <eblake@redhat.com> wrote:

> 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->mmaps[0].size);    
> >> Sorry this does not compile for me on arm 32b:
> >>
> >> ./trace/generated-tracers.h:16113:23: error: format ‘%lx’ expects
> >> argument of type ‘long unsigned int’, but argument 8 has type ‘off_t’
> >> [-Werror=format=] , name, bar, offset, size);
> >>  
> >> -> 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"]" ?  
> >   
> 
> >  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.

Looks like we need another respin anyway, and uint64_t works just as
well here.  Done.  Thanks,

Alex

  reply	other threads:[~2016-03-11  4:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 19:53 [Qemu-devel] [PULL 0/8] VFIO updates 2016-03-09 Alex Williamson
2016-03-09 19:53 ` [Qemu-devel] [PULL 1/8] vfio: Add sysfsdev property for pci & platform Alex Williamson
2016-03-09 19:53 ` [Qemu-devel] [PULL 2/8] vfio: Wrap VFIO_DEVICE_GET_REGION_INFO Alex Williamson
2016-03-09 19:53 ` [Qemu-devel] [PULL 3/8] vfio: Generalize region support Alex Williamson
2016-03-10  0:54   ` Eric Auger
2016-03-10 16:34     ` Alex Williamson
2016-03-10 20:46       ` Eric Blake
2016-03-11  4:14         ` Alex Williamson [this message]
2016-03-09 19:53 ` [Qemu-devel] [PULL 4/8] vfio/pci: Convert all MemoryRegion to dynamic alloc and consistent functions Alex Williamson
2016-03-09 19:53 ` [Qemu-devel] [PULL 5/8] vfio/pci: Fixup PCI option ROMs Alex Williamson
2016-03-09 19:53 ` [Qemu-devel] [PULL 6/8] vfio/pci: Split out VGA setup Alex Williamson
2016-03-09 19:53 ` [Qemu-devel] [PULL 7/8] vfio/pci: replace fixed string limit by g_strdup_printf Alex Williamson
2016-03-09 19:53 ` [Qemu-devel] [PULL 8/8] MAINTAINERS: Add entry for the include/hw/vfio/ folder Alex Williamson
2016-03-10  5:03 ` [Qemu-devel] [PULL 0/8] VFIO updates 2016-03-09 Peter Maydell
2016-03-10  5:04   ` Peter Maydell
2016-03-10 15:00   ` Alex Williamson
  -- strict thread matches above, loose matches on Subject: below --
2016-03-10 16:55 [Qemu-devel] [PULL 0/8] VFIO updates 2016-03-10 Alex Williamson
2016-03-10 16:55 ` [Qemu-devel] [PULL 3/8] vfio: Generalize region support Alex Williamson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160310211440.638b9ae1@t450s.home \
    --to=alex.williamson@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eric.auger@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).