From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6DD11EB64DC for ; Tue, 11 Jul 2023 03:31:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gtRl+VrW23uNsp4qTTQ4clfylVBpFB7LanyHpqNEFNg=; b=IR8HUVhdeyPpA/ rRsPSuQ3q1uLxYsVF83Uavv1Dx9/W035mSQ8/hpLrp6oMlPfZu+NhlS67YjejNzf0/NIjDiXtXGCw 3GHOEqtmGyjgx9K+u/Mhd6KupWRT13lqE1PWc070U9P2KO1fLR3Zlz2aSLekJCMOASWEGXHu5XOqE N/32h4p75/4AC2AN4I9XQ1D3i5XNFHB4ceNAG9OJFUKEQkd2dQFLCl1vL8wk3w+Au6HUYhCyHEplm 11nx1L3UQcdejwZUPqQ4VSiY1Yrksq7GRmQI68L+eCAhyII+dAzlAqZE02VjUMLrrjjq5/nAc0bVE HZ46Pc1BdQ+VTbas9+8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJ45i-00DTuU-1j; Tue, 11 Jul 2023 03:31:06 +0000 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJ45e-00DTsf-3C for linux-arm-kernel@lists.infradead.org; Tue, 11 Jul 2023 03:31:04 +0000 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36B2qEi7000675; Tue, 11 Jul 2023 03:30:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=2E5Wwf9zHynho7YeHL1uNkcW/BeMipMerE6+V7msgwY=; b=IXfoD3tnf3yuTxPk5QEEODaQTBDcwCWehfOYpU5OPNfQJ2W01WpDLJugS2CsnEAaCXc0 ZXb5lerFqo6eQO8z1Ikwwi/rHs1csJebeTRoJfBBIzIFvlbyMwtccORQYS5Pdn6j+fTw VeoNdq7bIbuvsHqT6FYkRoAcMOC/EX9Kxs6n2Mc6+pA6/o5ioERDukxhzD3xt65raRns zn5I8Ckw+frTvmWnOpS9fOO+zV9jGivjiOPSQaFeQa+KCXc6JKRnnkERdO9X3vMWFkdn 4C26IaI1POAKjcIqHAAKP7cFX3EjzC2CSqbcQ2YZ4dyPmAQDriLWZ5neE87yPfw6haIu pA== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3rrx7yg2u9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jul 2023 03:30:51 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 36B3UoKh001774 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jul 2023 03:30:50 GMT Received: from [10.239.133.73] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Mon, 10 Jul 2023 20:30:47 -0700 Message-ID: <6e07ad52-2629-346e-6217-ec07777ebc5b@quicinc.com> Date: Tue, 11 Jul 2023 11:30:44 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH] arm64: Add the arm64.nolse_atomics command line option To: Marc Zyngier CC: , , , , , , , , , , References: <20230710055955.36551-1-quic_aiquny@quicinc.com> <875y6s8bwb.wl-maz@kernel.org> <32f442e3-3d5c-4cec-9791-0da039f88287@quicinc.com> <874jmc8654.wl-maz@kernel.org> From: "Aiqun(Maria) Yu" In-Reply-To: <874jmc8654.wl-maz@kernel.org> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: GVrel2fJN7N_WB35GqcX8c5jdxgxhIwD X-Proofpoint-ORIG-GUID: GVrel2fJN7N_WB35GqcX8c5jdxgxhIwD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-10_18,2023-07-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0 priorityscore=1501 adultscore=0 suspectscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 lowpriorityscore=0 clxscore=1015 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307110029 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230710_203103_171779_6933B5B1 X-CRM114-Status: GOOD ( 28.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 7/10/2023 5:31 PM, Marc Zyngier wrote: > On Mon, 10 Jul 2023 09:19:54 +0100, > "Aiqun(Maria) Yu" wrote: >> >> On 7/10/2023 3:27 PM, Marc Zyngier wrote: >>> On Mon, 10 Jul 2023 06:59:55 +0100, >>> Maria Yu wrote: >>>> >>>> In order to be able to disable lse_atomic even if cpu >>>> support it, most likely because of memory controller >>>> cannot deal with the lse atomic instructions, use a >>>> new idreg override to deal with it. >>> >>> In general, the idreg overrides are *not* there to paper over HW bugs. >>> They are there to force the kernel to use or disable a feature for >>> performance reason or to guide the *enabling* of a feature, but not >>> because the HW is broken. >>> >>> The broken status of a HW platform must also be documented so that we >>> know what to expect when we look at, for example, a bad case of memory >>> corruption (something I'd expect to see on a system that only >>> partially implements atomic memory operations). >>> >> >> good idea. A noc error would be happened if the lse atomic instruction >> happened during a memory controller doesn't support lse atomic >> instructions. >> I can put the information in next patchset comment message. Pls feel >> free to let know if there is other place to have this kind of >> information with. > > For a start, Documentation/arch/arm64/silicon-errata.rst should > contain an entry for the actual erratum, and a description of the > symptoms of the issue (you're mentioning a "noc error": how is that > reported to the CPU?). This is not a cpu's errata as my understanding. It is the DDR subsystem which don't have the LSE atomic feature supported. > > The workaround should also be detected at runtime -- we cannot rely on > the user to provide a command-line argument to disable an essential > feature that anyone has taken for granted for most of a decade... We are also seeking help from DDR Subsystem POC to see whether it is possible to detect the LSE atomic feature support or not at runtime. In my opinion, LSE atomic is a system level feature instead of a cpu only feature. So currently solution we is that even if cpu support lse atomic, but it still needed to be disabled if the cpu working with a lse atomic not support by current system's DDR subsystem. > > [...] > >>>> @@ -185,6 +195,7 @@ static const struct { >>>> { "arm64.nomops", "id_aa64isar2.mops=0" }, >>>> { "arm64.nomte", "id_aa64pfr1.mte=0" }, >>>> { "nokaslr", "arm64_sw.nokaslr=1" }, >>>> + { "arm64.nolse_atomic", "id_aa64isar0.atomic=0" }, >>> >>> And what of 32bit? > > This particular question still stands, as it is likely to affect VMs. > > M. > -- Thx and BRs, Aiqun(Maria) Yu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel