qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: stefanha@redhat.com, Alex Williamson <alex.williamson@redhat.com>
Subject: [Qemu-devel] [PATCH v2 28/30] trace: Fix parameter types in hw/vfio
Date: Mon, 13 Mar 2017 14:55:45 -0500	[thread overview]
Message-ID: <20170313195547.21466-29-eblake@redhat.com> (raw)
In-Reply-To: <20170313195547.21466-1-eblake@redhat.com>

An upcoming patch will let the compiler warn us when we are silently
losing precision in traces; update the trace definitions to pass
through the full value at the callsite.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
 hw/vfio/pci.c        |  3 ++-
 hw/vfio/trace-events | 14 +++++++-------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 03a3d01..6b4f588 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -1313,7 +1313,8 @@ static void vfio_pci_fixup_msix_region(VFIOPCIDevice *vdev)
             g_free(region->mmaps);
             region->mmaps = NULL;
             trace_vfio_msix_fixup(vdev->vbasedev.name,
-                                  vdev->msix->table_bar, 0, 0);
+                                  vdev->msix->table_bar, (uint64_t) 0,
+                                  (uint64_t) 0);
         } else {
             region->mmaps[0].offset = end;
             region->mmaps[0].size = region->size - end;
diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events
index 2561c6d..cac65ef 100644
--- a/hw/vfio/trace-events
+++ b/hw/vfio/trace-events
@@ -67,7 +67,7 @@ vfio_quirk_nvidia_bar0_msi_ack(const char *name) "%s"
 vfio_quirk_nvidia_bar0_probe(const char *name) "%s"
 vfio_quirk_rtl8168_fake_latch(const char *name, uint64_t val) "%s 0x%"PRIx64
 vfio_quirk_rtl8168_msix_write(const char *name, uint16_t offset, uint64_t val) "%s MSI-X table write[0x%x]: 0x%"PRIx64
-vfio_quirk_rtl8168_msix_read(const char *name, uint16_t offset, uint64_t val) "%s MSI-X table read[0x%x]: 0x%"PRIx64
+vfio_quirk_rtl8168_msix_read(const char *name, hwaddr offset, uint64_t val) "%s MSI-X table read[0x%" HWADDR_PRIx "]: 0x%"PRIx64
 vfio_quirk_rtl8168_probe(const char *name) "%s"

 vfio_quirk_ati_bonaire_reset_skipped(const char *name) "%s"
@@ -75,7 +75,7 @@ vfio_quirk_ati_bonaire_reset_no_smc(const char *name) "%s"
 vfio_quirk_ati_bonaire_reset_timeout(const char *name) "%s"
 vfio_quirk_ati_bonaire_reset_done(const char *name) "%s"
 vfio_quirk_ati_bonaire_reset(const char *name) "%s"
-vfio_pci_igd_bar4_write(const char *name, uint32_t index, uint32_t data, uint32_t base) "%s [%03x] %08x -> %08x"
+vfio_pci_igd_bar4_write(const char *name, uint32_t index, uint64_t data, uint64_t base) "%s [%03x] %08" PRIx64 " -> %08" PRIx64
 vfio_pci_igd_bdsm_enabled(const char *name, int size) "%s %dMB"
 vfio_pci_igd_opregion_enabled(const char *name) "%s"
 vfio_pci_igd_host_bridge_enabled(const char *name) "%s"
@@ -94,14 +94,14 @@ vfio_disconnect_container(int fd) "close container->fd=%d"
 vfio_put_group(int fd) "close group->fd=%d"
 vfio_get_device(const char * name, unsigned int flags, unsigned int num_regions, unsigned int num_irqs) "Device %s flags: %u, regions: %u, irqs: %u"
 vfio_put_base_device(int fd) "close vdev->fd=%d"
-vfio_region_setup(const char *dev, int index, const char *name, unsigned long flags, unsigned long offset, unsigned long size) "Device %s, region %d \"%s\", flags: %lx, offset: %lx, size: %lx"
+vfio_region_setup(const char *dev, int index, const char *name, uint32_t flags, unsigned long offset, unsigned long size) "Device %s, region %d \"%s\", flags: %" PRIx32 ", offset: %lx, size: %lx"
 vfio_region_mmap_fault(const char *name, int index, unsigned long offset, unsigned long size, int fault) "Region %s mmaps[%d], [%lx - %lx], fault: %d"
 vfio_region_mmap(const char *name, unsigned long offset, unsigned long end) "Region %s [%lx - %lx]"
 vfio_region_exit(const char *name, int index) "Device %s, region %d"
 vfio_region_finalize(const char *name, int index) "Device %s, region %d"
 vfio_region_mmaps_set_enabled(const char *name, bool enabled) "Region %s mmaps enabled: %d"
 vfio_region_sparse_mmap_header(const char *name, int index, int nr_areas) "Device %s region %d: %d sparse mmap entries"
-vfio_region_sparse_mmap_entry(int i, unsigned long start, unsigned long end) "sparse entry %d [0x%lx - 0x%lx]"
+vfio_region_sparse_mmap_entry(int i, unsigned long long start, unsigned long long end) "sparse entry %d [0x%llx - 0x%llx]"
 vfio_get_dev_region(const char *name, int index, uint32_t type, uint32_t subtype) "%s index %d, %08x/%0x8"

 # hw/vfio/platform.c
@@ -119,7 +119,7 @@ vfio_platform_start_edge_irqfd_injection(int index, int fd) "IRQ index=%d, fd =
 # hw/vfio/spapr.c
 vfio_prereg_listener_region_add_skip(uint64_t start, uint64_t end) "%"PRIx64" - %"PRIx64
 vfio_prereg_listener_region_del_skip(uint64_t start, uint64_t end) "%"PRIx64" - %"PRIx64
-vfio_prereg_register(uint64_t va, uint64_t size, int ret) "va=%"PRIx64" size=%"PRIx64" ret=%d"
-vfio_prereg_unregister(uint64_t va, uint64_t size, int ret) "va=%"PRIx64" size=%"PRIx64" ret=%d"
-vfio_spapr_create_window(int ps, uint64_t ws, uint64_t off) "pageshift=0x%x winsize=0x%"PRIx64" offset=0x%"PRIx64
+vfio_prereg_register(unsigned long long va, unsigned long long size, int ret) "va=%llx size=%llx ret=%d"
+vfio_prereg_unregister(unsigned long long va, unsigned long long size, int ret) "va=%llx size=%llx ret=%d"
+vfio_spapr_create_window(int ps, unsigned long long ws, unsigned long long off) "pageshift=0x%x winsize=0x%llx offset=0x%llx"
 vfio_spapr_remove_window(uint64_t off) "offset=%"PRIx64
-- 
2.9.3

  parent reply	other threads:[~2017-03-13 19:56 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13 19:55 [Qemu-devel] [PATCH for-2.9 v2 00/30] trace type mismatch cleanups Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 01/30] trace: Fix backwards mirror_yield parameters Eric Blake
2017-03-16  7:36   ` Stefan Hajnoczi
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 02/30] trace: Fix incorrect megasas trace parameters Eric Blake
2017-03-14  6:49   ` Hannes Reinecke
2017-03-16  7:36   ` Stefan Hajnoczi
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 03/30] trace: Avoid abuse of amdvi_mmio_read Eric Blake
2017-03-16  7:36   ` Stefan Hajnoczi
2017-03-23 15:23   ` Stefan Hajnoczi
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 04/30] trace: Fix parameter types in block Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 05/30] trace: Fix parameter types in io Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 06/30] trace: Fix parameter types in migration Eric Blake
2017-03-13 20:07   ` Dr. David Alan Gilbert
2017-03-13 20:18     ` Eric Blake
2017-03-14 11:32       ` Dr. David Alan Gilbert
2017-03-14 14:36         ` Eric Blake
2017-03-15 19:55           ` Eric Blake
2017-03-15 22:33             ` Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 07/30] trace: Fix parameter types in ui Eric Blake
2017-03-14  9:16   ` Gerd Hoffmann
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 08/30] trace: Fix parameter types in top level Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 09/30] trace: Fix parameter types in linux-user Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 10/30] trace: Fix parameter types in hw/acpi Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 11/30] trace: Fix parameter types in hw/audio Eric Blake
2017-03-14  9:16   ` Gerd Hoffmann
2017-03-22 15:10   ` Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 12/30] trace: Fix parameter types in hw/block Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 13/30] trace: Fix parameter types in hw/char Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 14/30] trace: Fix parameter types in hw/display Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 15/30] trace: Fix parameter types in hw/dma Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 16/30] trace: Fix parameter types in hw/i386 Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 17/30] trace: Fix parameter types in hw/input Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 18/30] trace: Fix parameter types in hw/intc Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 19/30] trace: Fix parameter types in hw/isa Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 20/30] trace: Fix parameter types in hw/misc Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 21/30] trace: Fix parameter types in hw/net Eric Blake
2017-03-14  7:21   ` Dmitry Fleytman
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 22/30] trace: Fix parameter types in hw/nvram Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 23/30] trace: Fix parameter types in hw/ppc Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 24/30] trace: Fix parameter types in hw/sd Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 25/30] trace: Fix parameter types in hw/scsi Eric Blake
2017-03-14  6:50   ` Hannes Reinecke
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 26/30] trace: Fix parameter types in hw/timer Eric Blake
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 27/30] trace: Fix parameter types in hw/usb Eric Blake
2017-03-14  9:16   ` Gerd Hoffmann
2017-03-13 19:55 ` Eric Blake [this message]
2017-03-13 19:55 ` [Qemu-devel] [PATCH v2 29/30] trace: Fix parameter types in hw/virtio Eric Blake
2017-03-16  7:45   ` Stefan Hajnoczi
2017-03-13 19:55 ` [Qemu-devel] [RFC PATCH v2 30/30] trace: Force compiler warnings on trace parameter type mismatches Eric Blake
2017-03-15 19:59   ` Eric Blake
2017-03-16  7:28     ` Stefan Hajnoczi
2017-03-13 20:27 ` [Qemu-devel] [PATCH for-2.9 v2 00/30] trace type mismatch cleanups no-reply

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=20170313195547.21466-29-eblake@redhat.com \
    --to=eblake@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).