From nobody Mon Feb 9 11:51:26 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=1603709773; cv=none; d=zohomail.com; s=zohoarc; b=jrtT0DgiOU/UEpQIWznF5lhyC2/TqsxVY6yL8UBIwMF9LFoSiNlz71psG2hZVY/iPBtF1TKMUePE24dwPe8uLd7Kx8AOTPAHPPbfAhzZQPE0RIWUkJxQdg0Uq2wqzh54wLL6E6jnguHKhBzqRcYbhssiqtWPQjBSGL7yP/Ushc0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603709773; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=BidoL8dEegdrM2deUWRHfDO/6zWVfLj47EJ1lH5mvto=; b=IBLjODQh2alW0fL0v0NnHZLZ3pL8IxzqCQRkdueYTVfhGAAP062SdcbaYtnDSaWwCgNEAF+1YSl+70CCTXoeqv/5e4D9BT6CWayIOWEpBaY+qGxbE0S0p2GERBbrtUfYLTIE4QtYTJW5nAW1Z28+AviNgR1vwqHJtFRjkIkhakw= 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) header.from= 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 1603709773599570.4222210625612; Mon, 26 Oct 2020 03:56:13 -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-315-R2uGNcTZOZCdcW9RoxImGQ-1; Mon, 26 Oct 2020 06:56:10 -0400 Received: by mail-wm1-f70.google.com with SMTP id c204so6200255wmd.5 for ; Mon, 26 Oct 2020 03:56:10 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (237.red-88-18-140.staticip.rima-tde.net. [88.18.140.237]) by smtp.gmail.com with ESMTPSA id e25sm22898049wra.71.2020.10.26.03.56.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 03:56:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603709772; 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=BidoL8dEegdrM2deUWRHfDO/6zWVfLj47EJ1lH5mvto=; b=c9aEUPaQq+48Q8xhhH5/wTmTXxdYNtQiCE6ZzBs5jttEfRN6deR8p5fcQBp3946yw1qegh fRtMO7W3iINlDqv/NV7L870Cuom95uI7+e6XAOcE0thXLRvIU35KjY3x6u1FnuHmk7jvVR 6bD8rpWBFizo/HU1/uBnCLJ59dfvVwA= X-MC-Unique: R2uGNcTZOZCdcW9RoxImGQ-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=BidoL8dEegdrM2deUWRHfDO/6zWVfLj47EJ1lH5mvto=; b=sDu0sEhrYxix+z/xmVYT5gEWLrpMkWPWH/JvwxV4gGvXB067RwXXHfaW2nnurTwXVI D7cRVNVuXOQDh1Ld51iGOrX3pc2w8iHhpQdegQvRb7HU8sqB7q7mYkngXp/2He3mv8ww UGSmYxiO/VZU1XEiHPD6ObMLBczSNM/gYoAYYnwIFYC2SSEx3yxkCpvZ99V1SdiEr4Ed p1EPKUOxpnCq55pMHXOb/r3k20fWC/OhoXv14R5zD/U/j03SOg742nyMyDBlJVzmWeB5 7raMPxSy2LJwT2RvYQntHUriBaj1StJz3tvsEuPxTR2OStWYqWQWyfgWGwUBxbKKZ1AD TiAw== X-Gm-Message-State: AOAM533VELpvSWHusWyl7KRrTwRdJ/Uc7gWoFnpyJLGRGr/NrwwHN4lp 8bmfn+uGYFZQTYO4fcwXf2xCDD1Y2yzxFqD+8IsXEd/ZL/ZdPeSqrNwwwldmOWFPSXSRWncX1ko IXQLIqIqMcOQo5Q== X-Received: by 2002:a05:600c:24d:: with SMTP id 13mr14576002wmj.99.1603709769694; Mon, 26 Oct 2020 03:56:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvib1sr9e0v6WzW/KFg2T/nJ/r7jrV/iPkNrvuKzj0bl/9aXsjVL4B2fzpWr8yyHH4Qkn7nQ== X-Received: by 2002:a05:600c:24d:: with SMTP id 13mr14575991wmj.99.1603709769565; Mon, 26 Oct 2020 03:56:09 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eric Auger , Alex Williamson , qemu-block@nongnu.org, Fam Zheng , Max Reitz , Stefan Hajnoczi , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 13/19] util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report() Date: Mon, 26 Oct 2020 11:54:58 +0100 Message-Id: <20201026105504.4023620-14-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201026105504.4023620-1-philmd@redhat.com> References: <20201026105504.4023620-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) 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 2c4598d7faa..488ddfca2a9 100644 --- a/util/vfio-helpers.c +++ b/util/vfio-helpers.c @@ -661,13 +661,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.26.2