From nobody Tue Feb 10 02:49:58 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=1630007428; cv=none; d=zohomail.com; s=zohoarc; b=AVrkg1NrGC5ANv44SAfABjfHKrIju6YHReP/VfWFdLVNUbsOVRjV8uzBYYnCx5kJJQiO8ZdD0/q3DsvlHgTSaiF4Y8UPsJ3IxWXNq14EXnKm+BFtShNSRkwYJwCbEDeTfaTSD4SCBm+t8qkp1gs63CjdLLOfx8mLC7rzB6Gs1r4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1630007428; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=rai7h32TrTkDK/wiLtMpSewodwbvjWhnx25D5kPSBpM=; b=QPWW+pcb9x73eg8nJVrWKWcFbw61U1hZIwscrx1gX3rEN1/WfkoNnZR4cdUpirnIiLmTaYNLd6UUXJtZAA5NTZKcSYvWKgTCE77zcTwnXtPVDuEUjMG6NP6/6EDlKYQFj105dBdL9K0carKE4TKw42rONkSoc3yhA9AzG1WregQ= 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 1630007428567583.4424689799523; Thu, 26 Aug 2021 12:50:28 -0700 (PDT) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-247-Ht7Y7qVPNWq-BMpzNabNBw-1; Thu, 26 Aug 2021 15:50:26 -0400 Received: by mail-wm1-f70.google.com with SMTP id k5-20020a7bc3050000b02901e081f69d80so1272298wmj.8 for ; Thu, 26 Aug 2021 12:50:26 -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 a10sm8817058wmj.44.2021.08.26.12.50.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Aug 2021 12:50:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630007427; 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=Vape+nU5EIRmNzpGxCEn6wjDu5auxD268RGcs6c768mSQVJzO4fVU2oD+nVJKuSEFiDdyH f5trtSl8sLkq+gpoygPqx5U4SniUbToS6HPSSz+lCzpguRlN8fiR0UASKcy4cxw3u5OeW9 V/LgB633LFGrZ9kS+q9JL8ohb8CzAP4= X-MC-Unique: Ht7Y7qVPNWq-BMpzNabNBw-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=Gq8VxWOgu9yEASKKAVx8JBgV2qzhmI8AFWDvGPdXEoM9E0fJoMQm8HXVClFt+j6SZS AReT8fwITYk9+TWY631s2MFI6VjVxz4ON0j/1yF8vsegca2A8J8o4/jWfrkFc08lvk9Y QYQlnj3cYKUOfvWRSXUiqZqRnWkPs7zaHzVN/hj7ANca4+KCmi4fdyJMpbf7Mo3MZVGA GoY+ajCBXIx6oAqNyWXQUe1tzGU49dIP1EY73u0gNRfBdyvAFtPL6D8xe/q6/Lc/5wco ZfHKrmlBDprwaUi+/PAtkHSgTY2Btpr84wO6qiY4oFmuYn2UwkzZU3btKFWJvsj/hQrW trYg== X-Gm-Message-State: AOAM532DdRMRZZTRn35SxTFwpgBMOvssosFYmPk5M8T66GotzCRJcrfq rlEPiVovFwkmAuGUv5rMRPxgt19/tNSTSPSUWC1eZkWXGXeKM9b3KONUmzELg2ti85DJRuHsXJi /0UcqfodFtEXioQ== X-Received: by 2002:a1c:210a:: with SMTP id h10mr7971659wmh.117.1630007425249; Thu, 26 Aug 2021 12:50:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDRJMm/10Yb6eJeXOOXHlAhtXlhDCxZAVFiUBI3triim5kJuM2Pq0s4mOxybiUpx/CAYgyqQ== X-Received: by 2002:a1c:210a:: with SMTP id h10mr7971645wmh.117.1630007425097; Thu, 26 Aug 2021 12:50:25 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Hanna Reitz , Klaus Jensen , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-block@nongnu.org, Fam Zheng , Stefan Hajnoczi , Auger Eric Subject: [PATCH v2 02/11] util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report() Date: Thu, 26 Aug 2021 21:50:05 +0200 Message-Id: <20210826195014.2180369-3-philmd@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210826195014.2180369-1-philmd@redhat.com> References: <20210826195014.2180369-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: 1630007429855100001 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 Reviewed-by: Klaus Jensen --- 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