From nobody Sun Apr 28 23:59:19 2024 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; 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 1497633843354404.12186157741905; Fri, 16 Jun 2017 10:24:03 -0700 (PDT) Received: from localhost ([::1]:60024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLuyY-00082R-0e for importer@patchew.org; Fri, 16 Jun 2017 13:24:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dLuxW-00072w-NZ for qemu-devel@nongnu.org; Fri, 16 Jun 2017 13:22:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dLuxT-0000Wg-J9 for qemu-devel@nongnu.org; Fri, 16 Jun 2017 13:22:58 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:35292 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dLuxT-0000W7-Cn for qemu-devel@nongnu.org; Fri, 16 Jun 2017 13:22:55 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v5GHIoZU160142 for ; Fri, 16 Jun 2017 13:22:54 -0400 Received: from e24smtp02.br.ibm.com (e24smtp02.br.ibm.com [32.104.18.86]) by mx0b-001b2d01.pphosted.com with ESMTP id 2b4k36h8r3-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 16 Jun 2017 13:22:53 -0400 Received: from localhost by e24smtp02.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 Jun 2017 14:22:51 -0300 Received: from d24relay03.br.ibm.com (9.13.39.225) by e24smtp02.br.ibm.com (10.172.0.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 16 Jun 2017 14:22:48 -0300 Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.8.31.91]) by d24relay03.br.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v5GHMlDZ30015572; Fri, 16 Jun 2017 14:22:48 -0300 Received: from d24av01.br.ibm.com (localhost [127.0.0.1]) by d24av01.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v5GHMm5s004012; Fri, 16 Jun 2017 14:22:48 -0300 Received: from localhost.localdomain ([9.80.230.190]) by d24av01.br.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v5GHMjWn003917; Fri, 16 Jun 2017 14:22:46 -0300 From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Date: Fri, 16 Jun 2017 14:22:30 -0300 X-Mailer: git-send-email 2.9.4 X-TM-AS-MML: disable x-cbid: 17061617-0020-0000-0000-000002B642DD X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17061617-0021-0000-0000-000030D55106 Message-Id: <20170616172230.22755-1-danielhb@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-16_10:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=3 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706160287 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH] 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: qemu-ppc@nongnu.org, mdroth@linux.vnet.ibm.com, david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- hw/ppc/spapr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e877d45..bd31972 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1326,7 +1326,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