From nobody Sun May 19 07:16:20 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=1621856593; cv=none; d=zohomail.com; s=zohoarc; b=JuBcB1RUucvKIQH3Z5SqKz9XufgAt6Ipoi6PmXVnGW/r1Zko8SQ0lzWi2Bn2sMPDlDjQ7LBUqUDZWbD8yR5SqhBRD48wmbnZ4A/QnziTpl/Ll3OT4wN1Qk752j8lFTDCLFsGDfIWvgtssAVNbERajuvT1Td6ogRf9Z8bngv6YPI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621856593; 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=9biH7zVQcshVIbAvAp/nz5tkUuaV3IpdS5jcgbHS7RA=; b=DDxbM1/lx8Kouc4OA5W0bNMRxrJ15QYqZdWtvzUTtBneEDxUoAFh7vQ1Wm9uUZF5UlvV5yybNEnu34diST2PI8sdRjsHcbyuE9zBouxnSSUQ7eYfHGwsPNgUgdthhgvrBisdc0lBwZTlh0s5iGzVqyRR11I7FLgiljT5efRdu9A= 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 1621856592991925.294777144309; Mon, 24 May 2021 04:43:12 -0700 (PDT) Received: from localhost ([::1]:45586 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ll8zH-0000BC-E9 for importer@patchew.org; Mon, 24 May 2021 07:43:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll8yJ-0007wX-At; Mon, 24 May 2021 07:42:11 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:18432) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ll8yD-0007NH-C5; Mon, 24 May 2021 07:42:08 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14OBXNJl056068; Mon, 24 May 2021 07:41:41 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 38raqrh704-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 May 2021 07:41:40 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 14OBXiYr057196; Mon, 24 May 2021 07:41:39 -0400 Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com with ESMTP id 38raqrh6xd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 May 2021 07:41:39 -0400 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 14OBMbjM019975; Mon, 24 May 2021 11:41:38 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 38psk88rjw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 24 May 2021 11:41:37 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 14OBfZYr29557008 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 May 2021 11:41:35 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A8150AE051; Mon, 24 May 2021 11:41:35 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D267AE04D; Mon, 24 May 2021 11:41:35 +0000 (GMT) Received: from smtp.tlslab.ibm.com (unknown [9.101.4.1]) by d06av26.portsmouth.uk.ibm.com (Postfix) with SMTP; Mon, 24 May 2021 11:41:35 +0000 (GMT) Received: from yukon.ibmuc.com (unknown [9.171.88.112]) by smtp.tlslab.ibm.com (Postfix) with ESMTP id A3A7F22020E; Mon, 24 May 2021 13:41:34 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: David Gibson , Greg Kurz , Nicholas Piggin Subject: [PATCH] spapr: propagate LPCR to hot-plugged CPUs Date: Mon, 24 May 2021 13:41:32 +0200 Message-Id: <20210524114132.572659-1-clg@kaod.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: a-DhgZNTFw7BsEgY_eEywVXQ6vCWNIaG X-Proofpoint-ORIG-GUID: qRVFPeTfH3-r4-EtHQ4W6Sm1IbfubJqY X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-05-24_06:2021-05-24, 2021-05-24 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 bulkscore=0 mlxlogscore=842 priorityscore=1501 clxscore=1034 phishscore=0 mlxscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105240078 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.158.5; envelope-from=clg@kaod.org; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, 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: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Distros have started using the 'scv' instructions (glibc 2.33) which relies on the LPCR AIL bits. Unfortunately, the LPCR of hot-plugged CPUs is not synchronized with the rest of machine and it breaks the guest OS. Fix that by using the first CPU to set the LPCR value of all hot-plugged CPUs. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Greg Kurz --- hw/ppc/spapr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index c23bcc449071..e463c2570c7a 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3890,6 +3890,8 @@ static void spapr_core_plug(HotplugHandler *hotplug_d= ev, DeviceState *dev) for (i =3D 0; i < cc->nr_threads; i++) { ppc_set_compat(core->threads[i], POWERPC_CPU(first_cpu)->compa= t_pvr, &error_abort); + ppc_store_lpcr(core->threads[i], + POWERPC_CPU(first_cpu)->env.spr[SPR_LPCR]); } } =20 --=20 2.31.1