From nobody Tue Feb 10 14:33:15 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1498820249541707.7321701259033; Fri, 30 Jun 2017 03:57:29 -0700 (PDT) Received: from localhost ([::1]:43684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQtc8-0000yX-6j for importer@patchew.org; Fri, 30 Jun 2017 06:57:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQtRn-0008Vp-0G for qemu-devel@nongnu.org; Fri, 30 Jun 2017 06:46:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQtRl-0007xv-UI for qemu-devel@nongnu.org; Fri, 30 Jun 2017 06:46:46 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:54831) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dQtRl-0007vL-GP; Fri, 30 Jun 2017 06:46:45 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3wzY9n5j8cz9t2M; Fri, 30 Jun 2017 20:46:37 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1498819597; bh=C+LWZTt49C65UUn3eNk4pY+YqJWaRf4IC+qvDQBJGCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hY2LFTl3ACNfI/EP99/2EiIAEkfr56p4dXW8ulJw80QKpAUAqkuiYTfjsusbmKpSl eDkQtSUD0qv1wu170Q7UbPs8mXxyCPMRaEZrcPCyPWDRdl2fFkvIY2flaGJaNcQrp1 PenHFEG8MJoN1eJmfB4xQ1C8/wYRa0cQOOwETr14= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 30 Jun 2017 20:46:25 +1000 Message-Id: <20170630104632.27942-15-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170630104632.27942-1-david@gibson.dropbear.id.au> References: <20170630104632.27942-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 14/21] hw/ppc/spapr.c: consecutive 'spapr->patb_entry = 0' statements X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, thuth@redhat.com, qemu-devel@nongnu.org, sursingh@redhat.com, mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-ppc@nongnu.org, Daniel Henrique Barboza , sbobroff@redhat.com, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Daniel Henrique Barboza In ppc_spapr_reset(), if the guest is using HPT, the code was executing: } else { spapr->patb_entry =3D 0; spapr_setup_hpt_and_vrma(spapr); } And, at the end of spapr_setup_hpt_and_vrma: /* We're setting up a hash table, so that means we're not radix */ spapr->patb_entry =3D 0; Resulting in spapr->patb_entry being assigned to 0 twice in a row. Given that 'spapr_setup_hpt_and_vrma' is also called inside 'spapr_check_setup_free_hpt' of spapr_hcall.c, this trivial patch removes the 'patb_entry =3D 0' assignment from the 'else' clause inside ppc_spapr_r= eset to avoid this behavior. Signed-off-by: Daniel Henrique Barboza Signed-off-by: David Gibson --- hw/ppc/spapr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index ef944f7..3c12af0 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1376,7 +1376,6 @@ static void ppc_spapr_reset(void) * Set the GR bit in PATB so that we know there is no HPT. */ spapr->patb_entry =3D PATBE1_GR; } else { - spapr->patb_entry =3D 0; spapr_setup_hpt_and_vrma(spapr); } =20 --=20 2.9.4