From nobody Sun Oct 5 20:56:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1489435764593489.3308325733367; Mon, 13 Mar 2017 13:09:24 -0700 (PDT) Received: from localhost ([::1]:54161 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnWHR-0002hm-AG for importer@patchew.org; Mon, 13 Mar 2017 16:09:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnW4t-0000ye-5j for qemu-devel@nongnu.org; Mon, 13 Mar 2017 15:56:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnW4s-0002eb-5a for qemu-devel@nongnu.org; Mon, 13 Mar 2017 15:56:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32962) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cnW4r-0002eN-TO for qemu-devel@nongnu.org; Mon, 13 Mar 2017 15:56:22 -0400 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 05B837B025 for ; Mon, 13 Mar 2017 19:56:22 +0000 (UTC) Received: from red.redhat.com (unknown [10.10.121.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5AC2B2D655; Mon, 13 Mar 2017 19:56:21 +0000 (UTC) From: Eric Blake To: qemu-devel@nongnu.org Date: Mon, 13 Mar 2017 14:55:45 -0500 Message-Id: <20170313195547.21466-29-eblake@redhat.com> In-Reply-To: <20170313195547.21466-1-eblake@redhat.com> References: <20170313195547.21466-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 13 Mar 2017 19:56:22 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 28/30] trace: Fix parameter types in hw/vfio X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alex Williamson , stefanha@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- 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 =3D 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 =3D end; region->mmaps[0].size =3D 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%"PRIx= 64 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 v= al) "%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, u= int32_t base) "%s [%03x] %08x -> %08x" +vfio_pci_igd_bar4_write(const char *name, uint32_t index, uint64_t data, u= int64_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= =3D%d" vfio_put_group(int fd) "close group->fd=3D%d" vfio_get_device(const char * name, unsigned int flags, unsigned int num_re= gions, unsigned int num_irqs) "Device %s flags: %u, regions: %u, irqs: %u" vfio_put_base_device(int fd) "close vdev->fd=3D%d" -vfio_region_setup(const char *dev, int index, const char *name, unsigned l= ong 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 f= lags, 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 m= maps 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 en= d) "sparse entry %d [0x%lx - 0x%lx]" +vfio_region_sparse_mmap_entry(int i, unsigned long long start, unsigned lo= ng long end) "sparse entry %d [0x%llx - 0x%llx]" vfio_get_dev_region(const char *name, int index, uint32_t type, uint32_t s= ubtype) "%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=3D%d, fd =3D # hw/vfio/spapr.c vfio_prereg_listener_region_add_skip(uint64_t start, uint64_t end) "%"PRIx= 64" - %"PRIx64 vfio_prereg_listener_region_del_skip(uint64_t start, uint64_t end) "%"PRIx= 64" - %"PRIx64 -vfio_prereg_register(uint64_t va, uint64_t size, int ret) "va=3D%"PRIx64" = size=3D%"PRIx64" ret=3D%d" -vfio_prereg_unregister(uint64_t va, uint64_t size, int ret) "va=3D%"PRIx64= " size=3D%"PRIx64" ret=3D%d" -vfio_spapr_create_window(int ps, uint64_t ws, uint64_t off) "pageshift=3D0= x%x winsize=3D0x%"PRIx64" offset=3D0x%"PRIx64 +vfio_prereg_register(unsigned long long va, unsigned long long size, int r= et) "va=3D%llx size=3D%llx ret=3D%d" +vfio_prereg_unregister(unsigned long long va, unsigned long long size, int= ret) "va=3D%llx size=3D%llx ret=3D%d" +vfio_spapr_create_window(int ps, unsigned long long ws, unsigned long long= off) "pageshift=3D0x%x winsize=3D0x%llx offset=3D0x%llx" vfio_spapr_remove_window(uint64_t off) "offset=3D%"PRIx64 --=20 2.9.3