From nobody Sun Feb 8 02:03:06 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=1602676423; cv=none; d=zohomail.com; s=zohoarc; b=WypGnf2pMB7qC2DRhCGm5r5zyumhT0cl9tF5z9H6dwj577jAXcJIhKPTKHePKM4sKLhqD9YyIKbu11JqkhSogYv4bGxM//uURkwamXvm8daLo+bNcBY8ktTL9RxUOaonKCRw+Pf7M3XR2+bhNtVy+1OoOXa8U646V8q4YyCtKfg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1602676423; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=uTVh2AtSozqPFxInc/ksQHh3UVKG/5ht671RHOKC4pA=; b=JPOTLevp2kpuz9KY0gVzAOXCDj7FdotpdmsoO+JLiKTEmDauaYEZ+fAA7+zPxi6wXH6vcRlTl/QHs8A9zoqg8a9JM09mGybiHCHiLCH09daG0nBDxpOlZvU6vWOoAmynJu7D7rgO6sw7RqmfNjRRinJpQdWI59QO+S83X/y+nWA= 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 1602676423698520.7289085650623; Wed, 14 Oct 2020 04:53:43 -0700 (PDT) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-461-DL8HXYsEODmBgyZoTlClZw-1; Wed, 14 Oct 2020 07:53:41 -0400 Received: by mail-wr1-f69.google.com with SMTP id f11so1169236wro.15 for ; Wed, 14 Oct 2020 04:53:40 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (106.red-83-59-162.dynamicip.rima-tde.net. [83.59.162.106]) by smtp.gmail.com with ESMTPSA id f14sm4742637wrt.53.2020.10.14.04.53.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2020 04:53:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602676422; 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=uTVh2AtSozqPFxInc/ksQHh3UVKG/5ht671RHOKC4pA=; b=DHyBFkhY2Wpl+NaaAJpjF58I4KldH6jQBWKRR+HqwHzgzqMgA2aX1eFkdwGqMr/xHNB5lm JlnvUnw6nHrzDqniaR+lijppbI39w43DCVE2F10nHGxF1SdHss0AWUy46S0B0oP2jxkPiI kZBsAtMvbxdTAZCujUHVKI3wowOOBwk= X-MC-Unique: DL8HXYsEODmBgyZoTlClZw-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=uTVh2AtSozqPFxInc/ksQHh3UVKG/5ht671RHOKC4pA=; b=qpVbNPBqbSUDfvDazNxh2/ZLa6MlHfnq+ev0Lv5FxTbITOxjoGjFKcaDq7k1VHPwds jT+gd2kUziQdnb0G2r93eFjW15zcDZVs+ozeYdHUc7ciGgo3PYHzBZswPGpCH+mmvNcT DhKSRwmYfLUMguUrMTq2yNiyPZUB3dxXVK3jIRVfYKzd82VRk/EABva+XNQnuZP4d2lj PQEuqlUafAbwmAeSOey+tVx44eFv/Byyn+aJtXkSpvaTIwHRWIUb/cjJGPIflZBhRpjg 3By+N/bd9Qpk74//WYl+jwF62EnusJeGn6upqmc1IejlzUorwHV1ConjU8bl6fasOowc cJ4w== X-Gm-Message-State: AOAM533X1pxHfMsEFWJxM2aNYeALMWCfnWiPoaBGbQHcebkBENoW/88H 5w4m9hFd/mwkNllbXM69BPFhrs4db0Ee7NBSHWum1p30dZLXeJD3bUFacV1Uw1mklcnEQaikV/L l/Ua8NVLjN0qWOg== X-Received: by 2002:a5d:40cb:: with SMTP id b11mr5507276wrq.254.1602676419948; Wed, 14 Oct 2020 04:53:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZTq3DOuNlD4CjLYuFd9cTUF2hAZlueRat6xzS8TZp5RX2oIrBnEpKOMREHnmI2CSqIK2tWQ== X-Received: by 2002:a5d:40cb:: with SMTP id b11mr5507251wrq.254.1602676419740; Wed, 14 Oct 2020 04:53:39 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Alex Williamson , Max Reitz , Fam Zheng , qemu-block@nongnu.org, Stefan Hajnoczi , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 9/9] util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report() Date: Wed, 14 Oct 2020 13:52:53 +0200 Message-Id: <20201014115253.25276-10-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201014115253.25276-1-philmd@redhat.com> References: <20201014115253.25276-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. 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