From nobody Tue Feb 10 03:37:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1629814321; cv=none; d=zohomail.com; s=zohoarc; b=aeCH7KyE/CkqV3s0Pt9JpUzsG9d6zm3G4EqO+Cmnyowu0J5CLr4CxBmze4HOVx1iz/DtWqS51ppXOJGEd36s+3m67o2nbbTcQSA420f6Cph3FHb45ZYW/93n8uK+f5beE2ZodmGVeKqFEc8h2QPqVy80NtHkQLCwYY8A6gQoNkY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629814321; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=rai7h32TrTkDK/wiLtMpSewodwbvjWhnx25D5kPSBpM=; b=XxW5NS3NuKlq/LdehNI8VEg3/ZAcYpsEDNyyAL5diFYj4D8TDeBFSMXlZXXwiehSNgjpuZWA0NSMMruQFqjHeMnBpuPzy2ApFD+dVG4+WkL+pMyf6OHSGw82RT20K/x3NgQzo0lmxkinDlMZOmTHtYFNITaKYc2OboRnIP5Wfl0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1629814321838566.8388841512236; Tue, 24 Aug 2021 07:12:01 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-441--2bE0Xm9MlmfaOaEs8D1Iw-1; Tue, 24 Aug 2021 10:11:59 -0400 Received: by mail-wm1-f71.google.com with SMTP id f19-20020a1c1f13000000b002e6bd83c344so1103399wmf.3 for ; Tue, 24 Aug 2021 07:11:59 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.. (163.red-83-52-55.dynamicip.rima-tde.net. [83.52.55.163]) by smtp.gmail.com with ESMTPSA id j1sm15012386wrd.50.2021.08.24.07.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Aug 2021 07:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629814320; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rai7h32TrTkDK/wiLtMpSewodwbvjWhnx25D5kPSBpM=; b=K9tokYdLbM9sO0OUWB2N5HSN991XAilrs4WFe4tThz8+tg3yIbsrW8O5c2vIcl6LVYn6qc cPH4h9qUOCqhOHTvWSayp8ppRpq7rp536x3yN0c6gRmnosh/gC/lcKqaNOFHGXU23V7PMF ao8pLLQLJG+/+2RTSWiFe95tREsbm4w= X-MC-Unique: -2bE0Xm9MlmfaOaEs8D1Iw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rai7h32TrTkDK/wiLtMpSewodwbvjWhnx25D5kPSBpM=; b=qm8Dwtee78arpEw6W5bHU93wo4JcaxBCtjsisZ15vp9YV9pvmgo2X4EiCtQhtLg1fg UPWzvBop/2GzF1U1gKY6DtyFbBX4liuN3eXCnh06P5XcZOPHFVGFRKyyW0I6Um+lhBbj EGX0SYD0WgOndgy9cq+k4NTBAAKlztFz8dBd+DeFlnk0uBGZbqA8lHRML0zksLdpnP7a E7zUT6v+F3Eww8Coaxs+wd3sk1f/I2Tn1ff+XoSoMTuO22jJE55AJU+zEztqpdGEjn7A QMES8sFkmaxKuMQNYKI/tWF+xwc6T+PTm2xSSngvm+atgr/nUgBo9N7fUwsk4+suwtGj iuEA== X-Gm-Message-State: AOAM532hTaC/5kEW9R/nw3L46md/nC2dpstvc1GZpigv5XTRBbOEvCRA gOJJY7Je9qqXa6/SBgyAnndpSDcTLRI9EpyxJKm9wo6A2oCKRwnMs5W4xZ5DAVF63LTECT/lZgp 2CdomEf00foQ8rw== X-Received: by 2002:adf:f743:: with SMTP id z3mr12275640wrp.211.1629814318409; Tue, 24 Aug 2021 07:11:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbkfSVNDCdzjgg5KW9qyinMJbGLgAOUfEcqYQmvPVBmbH0VSbq0b7aHa1mIRyoBnh4hkV1jA== X-Received: by 2002:adf:f743:: with SMTP id z3mr12275624wrp.211.1629814318280; Tue, 24 Aug 2021 07:11:58 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Hajnoczi , Auger Eric , Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org, Fam Zheng Subject: [PATCH 3/9] util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report() Date: Tue, 24 Aug 2021 16:11:36 +0200 Message-Id: <20210824141142.1165291-4-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210824141142.1165291-1-philmd@redhat.com> References: <20210824141142.1165291-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1629814323625100003 Instead of displaying the error on stderr, use error_report() which also report to the monitor. Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- util/vfio-helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c index 911115b86e6..1d149136299 100644 --- a/util/vfio-helpers.c +++ b/util/vfio-helpers.c @@ -660,13 +660,13 @@ static bool qemu_vfio_verify_mappings(QEMUVFIOState *= s) if (QEMU_VFIO_DEBUG) { for (i =3D 0; i < s->nr_mappings - 1; ++i) { if (!(s->mappings[i].host < s->mappings[i + 1].host)) { - fprintf(stderr, "item %d not sorted!\n", i); + error_report("item %d not sorted!", i); qemu_vfio_dump_mappings(s); return false; } if (!(s->mappings[i].host + s->mappings[i].size <=3D s->mappings[i + 1].host)) { - fprintf(stderr, "item %d overlap with next!\n", i); + error_report("item %d overlap with next!", i); qemu_vfio_dump_mappings(s); return false; } --=20 2.31.1