From nobody Fri Apr 26 15:06:01 2024 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=1620122558; cv=none; d=zohomail.com; s=zohoarc; b=KRGxEamNHRMntmffP7xDSTND3kWucCj05x/Tkk3D04nSRXK0aW9Pde15od5s62r1hQNQ+PDfKTbp/7KqooS+PhWAnBf2GwCf+MPuJnXWXq5PH+FpIP4pP08/HbCAPB68OEV4QP6MLgEU2kdL9h6tfQmDAk/Gk6WMkPJgt74XSEo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620122558; h=Content-Type: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=k7aBFHy42/vlQ/tm7YdwM3PCfGwlXp+qwCpLDCSVXiw=; b=Ch2HC1/XqA9XE28ZeZZMZAQKGrsz49MwEUbIdApG34Gfjnp1hrilZKHssdWhPqA/u0vhr4daBgqU9DwJR3kNTZPoVIrb0IPpWz3bv8J0v0JnvolhdHc1N3h7Sl+/JytiKzBQqWXaAKfLs1RA1j3MWqS/UfDVRf9fUzYPZPyjcpY= 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 1620122558050500.82369820790393; Tue, 4 May 2021 03:02:38 -0700 (PDT) Received: from localhost ([::1]:33960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldrsy-0002FI-OU for importer@patchew.org; Tue, 04 May 2021 06:02:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldrq7-0000Eg-HY; Tue, 04 May 2021 05:59:39 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:61546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldrq5-0001M2-Oa; Tue, 04 May 2021 05:59:39 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 1449aDfR067360; Tue, 4 May 2021 05:59:14 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 38b3qj8mdj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 May 2021 05:59:14 -0400 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1449aGv0067744; Tue, 4 May 2021 05:59:14 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 38b3qj8mc8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 May 2021 05:59:13 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 1449vIij003270; Tue, 4 May 2021 09:59:11 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma04ams.nl.ibm.com with ESMTP id 388xm8s4e3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 04 May 2021 09:59:11 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1449x8Xn42336554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 May 2021 09:59:08 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A37115204E; Tue, 4 May 2021 09:59:08 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av21.portsmouth.uk.ibm.com (Postfix) with SMTP id 6744552050; Tue, 4 May 2021 09:59:08 +0000 (GMT) Received: from yukon.ibmuc.com (unknown [9.171.24.120]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id 8FDDA22007C; Tue, 4 May 2021 11:59:07 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: David Gibson Subject: [PATCH] target/ppc: Do not check for LPCR[HAIL] on power10_v1.0 CPUs Date: Tue, 4 May 2021 11:59:00 +0200 Message-Id: <20210504095900.505668-1-clg@kaod.org> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: pV8iuDdEdIcUp5OckvO3m2ASnzINkoo_ X-Proofpoint-GUID: 8UtKwPc-3a5KEt_T32cA2Z8rAHbECOsJ X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-05-04_05:2021-05-04, 2021-05-04 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 spamscore=0 mlxlogscore=965 clxscore=1034 mlxscore=0 impostorscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2105040069 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: softfail client-ip=148.163.156.1; envelope-from=clg@kaod.org; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 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: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , qemu-ppc@nongnu.org, Greg Kurz , Nicholas Piggin , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The LPCR[HAIL] bit only applies to POWER10 DD2 CPUs. On POWER10 DD1, the ail value should be extracted using the LPCR_AIL mask like on P9. Cc: Nicholas Piggin Signed-off-by: C=C3=A9dric Le Goater --- target/ppc/excp_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index c0605f84d70f..ba18444f5d1e 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -198,6 +198,7 @@ static inline void ppc_excp_apply_ail(PowerPCCPU *cpu, = int excp_model, int excp, target_ulong *vector) { #if defined(TARGET_PPC64) + PowerPCCPUClass *pcc =3D POWERPC_CPU_GET_CLASS(cpu); CPUPPCState *env =3D &cpu->env; bool mmu_all_on =3D ((msr >> MSR_IR) & 1) && ((msr >> MSR_DR) & 1); bool hv_escalation =3D !(msr & MSR_HVB) && (*new_msr & MSR_HVB); @@ -240,7 +241,7 @@ static inline void ppc_excp_apply_ail(PowerPCCPU *cpu, = int excp_model, int excp, return; } =20 - if (*new_msr & MSR_HVB) { + if (*new_msr & MSR_HVB && pcc->lpcr_mask & LPCR_HAIL) { if (!(env->spr[SPR_LPCR] & LPCR_HAIL)) { /* HV interrupts depend on LPCR[HAIL] */ return; --=20 2.26.3