From nobody Mon May 6 09:24:44 2024 Delivered-To: importer@patchew.org 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; 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; dmarc=fail(p=none dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1576592789; cv=none; d=zohomail.com; s=zohoarc; b=LthdR41B+VqG3ZXhUv9aDUokaZaT8rB1DE2EK18Y0MkWkMzET7OUcDo1tWKyIHpIDG2jPPfTvkd1sWrPPx84eT16hN844Nhy22I4O6ittWZ4HBB/IqVU5uRDBrMEQ3VCNEHkANyZTUyUKrbJf/ZeQ41wrgQk2xuhTRxONxMh6c4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576592789; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Pl0rVj7skFZRRPnPq1UR8eFU9xSzJy0BS4Y14C6F4Ng=; b=LzK3uG/xG2KuxB6+gwytY6A8pCLGHpQIM2ZUbSUHj5Q7HOvZQnOce5UWMPKREw0mm/liepufQWmKqGA3ArdVXs/eFJn3REoaWeiP63wkbvQvV/UNhcC1J1TSKtWLcKGtnRITNZeVztsxAn7W7bsGmq11OPuTvOIj2Xmk0VN5HYE= 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576592788960606.7552759027875; Tue, 17 Dec 2019 06:26:28 -0800 (PST) Received: from localhost ([::1]:41186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihDnv-0003FB-Oo for importer@patchew.org; Tue, 17 Dec 2019 09:26:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55233) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihDn5-0002dQ-KT for qemu-devel@nongnu.org; Tue, 17 Dec 2019 09:25:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihDn4-0006PV-Nx for qemu-devel@nongnu.org; Tue, 17 Dec 2019 09:25:35 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:14068) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ihDn2-0006IG-Ba; Tue, 17 Dec 2019 09:25:32 -0500 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBHEEc6F018298; Tue, 17 Dec 2019 09:25:19 -0500 Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wwdq0rbpd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Dec 2019 09:25:19 -0500 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id xBHEF8b3021830; Tue, 17 Dec 2019 14:25:16 GMT Received: from b03cxnp07028.gho.boulder.ibm.com (b03cxnp07028.gho.boulder.ibm.com [9.17.130.15]) by ppma02dal.us.ibm.com with ESMTP id 2wvqc6m59a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 17 Dec 2019 14:25:16 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xBHEPFjD44040598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 17 Dec 2019 14:25:15 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1DF14C6062; Tue, 17 Dec 2019 14:25:15 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4B65DC6055; Tue, 17 Dec 2019 14:25:14 +0000 (GMT) Received: from farosas.linux.ibm.com.br.ibm.com (unknown [9.86.27.123]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 17 Dec 2019 14:25:13 +0000 (GMT) From: Fabiano Rosas To: qemu-devel@nongnu.org Subject: [PATCH] target/ppc: Handle AIL=0 in ppc_excp_vector_offset Date: Tue, 17 Dec 2019 11:25:12 -0300 Message-Id: <20191217142512.574075-1-farosas@linux.ibm.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-17_02:2019-12-17,2019-12-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 suspectscore=1 lowpriorityscore=0 spamscore=0 clxscore=1015 impostorscore=0 mlxlogscore=778 malwarescore=0 bulkscore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912170122 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 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: qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The exception vector offset calculation was moved into a function but the case when AIL=3D0 was not checked. The reason we got away with this is that the sole caller of ppc_excp_vector_offset checks the AIL before calling the function: /* Handle AIL */ if (ail) { ... vector |=3D ppc_excp_vector_offset(cs, ail); } Fixes: 2586a4d7a0 ("target/ppc: Move exception vector offset computation in= to a function") Signed-off-by: Fabiano Rosas --- target/ppc/excp_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 50b004d00d..5752ed4a4d 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -112,6 +112,8 @@ static uint64_t ppc_excp_vector_offset(CPUState *cs, in= t ail) uint64_t offset =3D 0; =20 switch (ail) { + case AIL_NONE: + break; case AIL_0001_8000: offset =3D 0x18000; break; --=20 2.23.0