From nobody Mon Nov 25 03:22:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=reject dis=none) header.from=linux.vnet.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1718659196; cv=none; d=zohomail.com; s=zohoarc; b=Q6gKfELoDJusgLLmDYhlHHiIjDyO5lLLe6LvsqvxxAOiTOpebOl5uuOZMngWf/lTHaVrEQPjnYw+vU4ygR9ookeuTjhqVvsX6rsOdV+QYgGbEvB1OVf3fwQuwH3nYYulekClcaQ6VeV+ME64z7k978t5v83Io2A1vhEldnruAe0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1718659196; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=OlOp9lKvRgAMoW0U1hFxpxrrkj7UkKIm3U8cxNg7020=; b=iCDwa3M5p5UMYrZRlInnVNaNVO07dSFOQ0DzqD8Kvwrfka68qlhxHG9x4Y/bd6zitsSJkPLdNfuqexw2SvVe2+RK+bbxx/zaXA1eiRyjnMCzE49dl54YVH2718J+N3F+9BTqSzK8krG53gsbQ6B7LylUeHdlTe/1aXlcgbrVTFE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1718659196776899.4995834186419; Mon, 17 Jun 2024 14:19:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJJkL-0004cd-4a; Mon, 17 Jun 2024 17:18:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJJDB-0002PO-Tn; Mon, 17 Jun 2024 16:44:21 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJJD9-0006Vj-TL; Mon, 17 Jun 2024 16:44:21 -0400 Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45HJuXU1007791; Mon, 17 Jun 2024 20:43:49 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yts568gss-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Jun 2024 20:43:49 +0000 (GMT) Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 45HKhmmJ013653; Mon, 17 Jun 2024 20:43:48 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yts568gsq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Jun 2024 20:43:48 +0000 (GMT) Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 45HJtqqq006210; Mon, 17 Jun 2024 20:43:47 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3ysn9udjuu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Jun 2024 20:43:47 +0000 Received: from smtpav01.fra02v.mail.ibm.com (smtpav01.fra02v.mail.ibm.com [10.20.54.100]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 45HKhgNA50594060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Jun 2024 20:43:44 GMT Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 168032004E; Mon, 17 Jun 2024 20:43:42 +0000 (GMT) Received: from smtpav01.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DAA5820043; Mon, 17 Jun 2024 20:43:40 +0000 (GMT) Received: from gfwr518.rchland.ibm.com (unknown [9.10.239.106]) by smtpav01.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 17 Jun 2024 20:43:40 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=pp1; bh=OlOp9lKvRgAMo W0U1hFxpxrrkj7UkKIm3U8cxNg7020=; b=hVMZg82k7xmLbOQr+D+D1FHgupizf ldZ5mDN47BnHdCVK92T6BSHwFnVwwNOFwngpiC6j7F0dsPjtQSIeU5e/rr/CHSdU 3knCHMqPfGR+VYhvo4hxelj4/EyMmCQ9L7oc7zr+jbsCrQRaWlvdwhpyMtTUcyXq 9jSnEAAgkfF/euedXDkbDnfu51ltaSZCG9OJHHUwRUChyv4rYYSgLoyJseFGi1zU XDWTJb+R2ypifCUnPfmiW/in2KVKjyEEL46lcjeI5ZpC8cZop5N73ncxajjhObqJ M6P1C+GpGBcM+Pf2IX31AAK4c/RQgMI7vQxswDm7EPj61UTv6kcCAeQJQ== From: Michael Kowal To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, clg@kaod.org, fbarrat@linux.ibm.com, npiggin@gmail.com, milesg@linux.ibm.com Subject: [PATCH 4/5] pnv/xive2: Fail VST entry address computation if table has no VSD Date: Mon, 17 Jun 2024 15:43:01 -0500 Message-Id: <20240617204302.12323-5-kowal@linux.vnet.ibm.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240617204302.12323-1-kowal@linux.vnet.ibm.com> References: <20240617204302.12323-1-kowal@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: E4ObE7hbeXM1kIfrXAKgX5iSqDDW92eT X-Proofpoint-ORIG-GUID: -BbmnqTSaKl997O403X4eDXQ3knMhfq9 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-17_14,2024-06-17_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=798 priorityscore=1501 bulkscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 clxscore=1015 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406170157 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: none client-ip=148.163.158.5; envelope-from=kowal@linux.vnet.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 17 Jun 2024 17:18:34 -0400 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1718659198811100003 Content-Type: text/plain; charset="utf-8" From: Frederic Barrat Fail VST entry address computatio if firmware doesn't define a descriptor for one of the Virtualization Structure Tables (VST), there's no point in trying to compute the address of its entry. Abort the operation and log an error. Signed-off-by: Michael Kowal Reviewed-by: C=C3=A9dric Le Goater --- hw/intc/pnv_xive2.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/intc/pnv_xive2.c b/hw/intc/pnv_xive2.c index a1146311a3..e473109196 100644 --- a/hw/intc/pnv_xive2.c +++ b/hw/intc/pnv_xive2.c @@ -244,6 +244,11 @@ static uint64_t pnv_xive2_vst_addr(PnvXive2 *xive, uin= t32_t type, uint8_t blk, } =20 vsd =3D xive->vsds[type][blk]; + if (vsd =3D=3D 0) { + xive2_error(xive, "VST: vsd =3D=3D 0 block id %d for VST %s %d !?", + blk, info->name, idx); + return 0; + } =20 /* Remote VST access */ if (GETFIELD(VSD_MODE, vsd) =3D=3D VSD_MODE_FORWARD) { --=20 2.39.3