From nobody Sun Nov 24 09:52:14 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1723729997; cv=none; d=zohomail.com; s=zohoarc; b=g2dzFg+Nmn8ib3MLnuHfRSf7mTovFxnC0vr4i+gWzWnyU3Fzp4wogHL47xaFAGwDZpgrFGS8NZn2KaQy4mzDOutZmjmPLi3FrwFmDmuG5xD2kXqqmYZrR1AbnsvDzeRsJzaDuA2QyGUAnwOw9gsIjUB0dn5bVp/cvQKbpiNoFyo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723729997; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=eSCVzhVBR4StelEvL55lkqBi3cGA1nPIyuOw4l2tGfs=; b=UiGOzmVJg2aout0V324HKMGcjfKLe80E+ED3ROYrwbRQOS7Cr7Gi6XejM8E7ftf28tv5pkoM2HYGwy4KVobtVCnVzj4xn5LCmFhVjxmhjz4FQ8J7MGIDdUUgekt+zguTExLJ/RwFa6utz5qLSa+b98E+OeO5aUPKvaikEEMthGc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723729997548366.23879207140544; Thu, 15 Aug 2024 06:53:17 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seauR-0001zC-T8; Thu, 15 Aug 2024 09:52:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seauL-0001xy-Uu for qemu-devel@nongnu.org; Thu, 15 Aug 2024 09:52:54 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seauJ-0007Wj-7m for qemu-devel@nongnu.org; Thu, 15 Aug 2024 09:52:53 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-37172a83a4bso426930f8f.0 for ; Thu, 15 Aug 2024 06:52:48 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37189897066sm1603659f8f.76.2024.08.15.06.52.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2024 06:52:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723729967; x=1724334767; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=eSCVzhVBR4StelEvL55lkqBi3cGA1nPIyuOw4l2tGfs=; b=lpVWEe9mA6luiCWKBfASnUwaxpkFE5iNHV4aUDOTXd+aDe+lKv2oW+qPcY1FQO/xfT zsi83mufoTcXn1YBxalER9IBuyzm27+xYRyhVxMPzUds7sndOmKdl/w184RKMwMKovCK /+wzWdx1+cgN/6QEYHlYl/4T50obp70LXv8eWgBSxw8wHxKFL4aaSxBxdSwmw6jomexI dZczHs11zSs/SPHYmfB4x3H8oCxFr5XJWurqvYjRfBoMwfs3nhyUSue4TqvW+hCifjhG +qxGoXxlN23SsBWU+rkjHTLjPcfZFn3sOlQ+1B8f8DBUfZVin0EQLnWR3ZjkCBrSe5UH SOfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723729967; x=1724334767; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=eSCVzhVBR4StelEvL55lkqBi3cGA1nPIyuOw4l2tGfs=; b=GsUWbISJt5VfSp5kkHgcsJkhj1NLQXw6/xYongLeoH7oULmKJNJae97kLqRfAq6rgm HER9+QBOL9nI4r2UvQhTTiB8MFlGt3rDWlOmGhcTK4Mr1XT/D6o++sXGfHmE2sNOu4bi 4fgVx0x9GjKz64F/tfdmH5b4N6rot9biGvrNZPG587z/EtZ2kzY8atFUFeml0869WLbL Lbh2kwE2hR/gpqyXag+DjLRz3O34jpkiCG5C7NORpo9CSRh5HZAmtqM3LDlLIsgiNtmL IzJh/v6mnAjMXgsijylD1alIqh2pIix/4OKQoeeDzyZp5xjROH8zgFiIq8vL3Rak2zxz Tspw== X-Gm-Message-State: AOJu0Yxus4pADFYg6E9ot4K/FrMVM1Nmh9a4Ma1tzdWYuBzjnsljmCv0 c3gN5oaZbEfTJTrOzxBRYJxpkcGsVqrQ8ByjPm/ifgtzSyd14LyF03mwlf3mCvJphnDEIKd7Hqr z X-Google-Smtp-Source: AGHT+IErz5cJjvXxAJG5OKH4h4n2FgqzJIWICgehqbTkMFpEas0qznu6c0Dnhn2pWA3ht6JCwqeasw== X-Received: by 2002:a5d:5c85:0:b0:371:7dd1:efb with SMTP id ffacd0b85a97d-3717dd110e3mr2517548f8f.60.1723729967263; Thu, 15 Aug 2024 06:52:47 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Alex Williamson , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH for-9.2] hw/vfio/pci.c: Use correct type in trace_vfio_msix_early_setup() Date: Thu, 15 Aug 2024 14:52:45 +0100 Message-Id: <20240815135245.3325267-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1723729999382116600 Content-Type: text/plain; charset="utf-8" The tracepoint trace_vfio_msix_early_setup() uses "int" for the type of the table_bar argument, but we use this to print a uint32_t. Coverity warns that this means that we could end up treating it as a negative number. We only use this in printing the value in the tracepoint, so mishandling it as a negative number would be harmless, but it's better to use the right type in the tracepoint. Use uint64_t to match how we print the table_offset in the vfio_msix_relo() tracepoint. Resolves: Coverity CID 1547690 Signed-off-by: Peter Maydell Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/vfio/trace-events | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events index 98bd4dccead..c475c273fd8 100644 --- a/hw/vfio/trace-events +++ b/hw/vfio/trace-events @@ -27,7 +27,7 @@ vfio_vga_read(uint64_t addr, int size, uint64_t data) " (= 0x%"PRIx64", %d) =3D 0x%" vfio_pci_read_config(const char *name, int addr, int len, int val) " (%s, = @0x%x, len=3D0x%x) 0x%x" vfio_pci_write_config(const char *name, int addr, int val, int len) " (%s,= @0x%x, 0x%x, len=3D0x%x)" vfio_msi_setup(const char *name, int pos) "%s PCI MSI CAP @0x%x" -vfio_msix_early_setup(const char *name, int pos, int table_bar, int offset= , int entries, bool noresize) "%s PCI MSI-X CAP @0x%x, BAR %d, offset 0x%x,= entries %d, noresize %d" +vfio_msix_early_setup(const char *name, int pos, int table_bar, uint64_t o= ffset, int entries, bool noresize) "%s PCI MSI-X CAP @0x%x, BAR %d, offset = 0x%"PRIx64", entries %d, noresize %d" vfio_check_pcie_flr(const char *name) "%s Supports FLR via PCIe cap" vfio_check_pm_reset(const char *name) "%s Supports PM reset" vfio_check_af_flr(const char *name) "%s Supports FLR via AF cap" --=20 2.34.1