From nobody Mon Nov 17 12:08:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1603809543; cv=none; d=zohomail.com; s=zohoarc; b=gkiCglMFavhknkMjQQpZVn678kUosORG6a/64hqGs8r6xRpNkePJKpy/UxmpZzwAo0KGqsyrNz7gV20lKIpwxxzQbOvzx1YKLaX2UMHaoGKUuxPgZHkO6wHYh5julMvmtJgh7Ic6oTI7TNAudayiSmmh0f2+day1VaNKt3PyrDs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1603809543; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=CnWzfZH4vJwtyceTKspxjaAdoaK81GRey1Z/IAvpmkY=; b=l4ekE4zH7h1xbeuhRp2lczY3jI4CX6MZ9Md11EzyxYr50DaTdWR5knvbgqK0y84gigBjnKuOblnEHXqVMOnC/FiVfcie7MrH4yscKCUwSBd3EgyLHEp36RN/ddYelulufvbJkbZk2JALDBcqoF3ozKLixtvM+xCSwoK4BGE/OD8= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1603809541402408.83594235502153; Tue, 27 Oct 2020 07:39:01 -0700 (PDT) Received: from localhost ([::1]:50950 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kXQ7o-0002Bv-FR for importer@patchew.org; Tue, 27 Oct 2020 10:39:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXPnf-0002HV-K0; Tue, 27 Oct 2020 10:18:12 -0400 Received: from bilbo.ozlabs.org ([2401:3900:2:1::2]:34431 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kXPnd-0007cR-8X; Tue, 27 Oct 2020 10:18:11 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4CLDLs1tDrz9shy; Wed, 28 Oct 2020 01:17:56 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1603808277; bh=FI9DropvBK9Z4BoxNEIGycdxZkK95p5nBGZ/kb5JGHo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RM5G2lbLSvSzCnfvdmAPtt2/PR+nsLntOm0/KFKqa5OeulWrUUkaRf70oq949RxIP 7GCC7bxuOOqz6t6hYpsrD/Bd27pvqyCXskO1FZg8C7/Isy3I1P0+JEMF8kUSf22WRq R32CGLpeU9m87ceFRvaA5As2CknRK2+wmx4OnjvA= From: David Gibson To: peter.maydell@linaro.org Subject: [PULL 15/18] spapr: Use error_append_hint() in spapr_reallocate_hpt() Date: Wed, 28 Oct 2020 01:17:32 +1100 Message-Id: <20201027141735.728821-16-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201027141735.728821-1-david@gibson.dropbear.id.au> References: <20201027141735.728821-1-david@gibson.dropbear.id.au> 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=2401:3900:2:1::2; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Gibson , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, groug@kaod.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Greg Kurz Hints should be added with the dedicated error_append_hint() API because we don't want to print them when using QMP. This requires to insert ERRP_GUARD as explained in "qapi/error.h". Signed-off-by: Greg Kurz Message-Id: <160371604030.305923.17464161378167312662.stgit@bahia.lan> Signed-off-by: David Gibson --- hw/ppc/spapr.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0cc19b5863..ba0894e73a 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1486,6 +1486,7 @@ void spapr_free_hpt(SpaprMachineState *spapr) void spapr_reallocate_hpt(SpaprMachineState *spapr, int shift, Error **errp) { + ERRP_GUARD(); long rc; =20 /* Clean up any HPT info from a previous boot */ @@ -1500,17 +1501,18 @@ void spapr_reallocate_hpt(SpaprMachineState *spapr,= int shift, =20 if (rc < 0) { /* kernel-side HPT needed, but couldn't allocate one */ - error_setg_errno(errp, errno, - "Failed to allocate KVM HPT of order %d (try smal= ler maxmem?)", + error_setg_errno(errp, errno, "Failed to allocate KVM HPT of order= %d", shift); + error_append_hint(errp, "Try smaller maxmem?\n"); /* This is almost certainly fatal, but if the caller really * wants to carry on with shift =3D=3D 0, it's welcome to try */ } else if (rc > 0) { /* kernel-side HPT allocated */ if (rc !=3D shift) { error_setg(errp, - "Requested order %d HPT, but kernel allocated order= %ld (try smaller maxmem?)", + "Requested order %d HPT, but kernel allocated order= %ld", shift, rc); + error_append_hint(errp, "Try smaller maxmem?\n"); } =20 spapr->htab_shift =3D shift; --=20 2.26.2