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 5C58DC04FFE for ; Tue, 23 Apr 2024 12:02:38 +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-Transfer-Encoding:Content-Type: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=nmnTYMvx0QlGMr4S5NGtKI+BPzgBXK3v2t0G/HaWdNs=; b=3uL32ZZOEpIEZJ i541kHwIDKYl4pIHBz/7wJRh/HoXR4IBURPo0LK4gM+4B8D/208Ycvz0m/IFcep+w7iC8oAO0gtiP d8o6W5f9nbkde5wKbjpQFGQGwTEWWWjX037YbFcYPw2gbrH8354jkWGluwldr5Ji8irUav2ZVvFuG AAKG0f8yUm5qXA2b9mZom+mIRHklbJcT+tnC/c2b1k4fBzRGstf8aXRRI9I/d9Be38yYY+ruux9Fe O0IHmDPqvamKUKVtt46asTWbrjLTRMKbC3Lws5+j0yC/2pVe1GOkgKBQO1I7/jdVgyebDbqMqvj0q XBZ4hpQN2IBTpX+aZClA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzEqp-0000000HGpb-23oG; Tue, 23 Apr 2024 12:02:19 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzEqn-0000000HGnz-1uIU for linux-arm-kernel@bombadil.infradead.org; Tue, 23 Apr 2024 12:02:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:CC:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description; bh=fi2lmleRd690v3hCdlvKA9XcNylnspGVxVWKuGObdeo=; b=nIrHwcp5KnZxfNvB1uVy7CKIoM faYhRvciplQQSZXxmrudfUIwu84deawf1qCgP5DjCPQj/yBvnt4V0luqaRtvmimTRhNNPm8DlrUAq QhdJrxyI5mdxsLKa1J7ZOypIThDjvPMUfKh8kLS9wXquCdDa5+sngv06Z2e9QC5w6soLmCs0L+z49 usNfen0RCH0DNX8nwE49/E/R/yESCV5iYR/QgnK6cDhSkgNjJb9HCyySSXpTunzBn3w0/zb5X9ryV zgcICZt6k3KP23XA7LBurdlt387ubftjFguKpcyBPmz8mc/aOWD4Gz+cNuxBE7Wo8bel/7dlCMxaP NeyptOvw==; Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by casper.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzEqc-0000000GH2B-2Qpg for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2024 12:02:15 +0000 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 43N7uMFp019461; Tue, 23 Apr 2024 12:01:01 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=fi2lmleRd690v3hCdlvKA9XcNylnspGVxVWKuGObdeo=; b=Xj YZsWWPzYZ7wIODrT5cEdl53zHAcY4KqggV90FY09DNHzniKsgiXvRRcBvOoCf35B IqP0SkLIZLUBMHdR8NxAo8sSXIKrvcw12YtQ9Lf/cXmIXoVP/8EGdXkPsvADf4QN jRUGjuaffBlVMEh2rp/xdlecfF3iZ0QrpIDnr42GzZ/cK0E2dH7mRR678k6etheW 4ZWBcCdQYARZuQmkjuBxCGdObTKDqG7fh3kYq33MTte5JGhCOkjQ7YSuibwa8amO rAJFxETPmiEl3OEd5AmjR4p1AVngjpzTFyMEjAo/u7md1pqeMAI8QGBl1g5l/J7l dzTXO/xD0rCI7xq57lMQ== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xp91rrkxh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Apr 2024 12:01:01 +0000 (GMT) Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 43NC10JS007750 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Apr 2024 12:01:00 GMT Received: from [10.239.132.150] (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.1544.9; Tue, 23 Apr 2024 05:00:57 -0700 Message-ID: <0b970cf5-a880-469c-93ab-9a268ee4ea2b@quicinc.com> Date: Tue, 23 Apr 2024 20:00:55 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] KVM: arm64: nv: Work around lack of pauth support in old toolchains To: Arnd Bergmann , Marc Zyngier , , CC: James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu , Mark Rutland , Joey Gouly , Will Deacon , Naresh Kamboju , Linaro Kernel Functional Testing References: <20240422224849.2238222-1-maz@kernel.org> From: "Aiqun Yu (Maria)" Content-Language: en-US In-Reply-To: X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) 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: BhKn0f0MysDdQRCdw6W7E_FxVpCgnzSU X-Proofpoint-ORIG-GUID: BhKn0f0MysDdQRCdw6W7E_FxVpCgnzSU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-23_09,2024-04-23_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0 clxscore=1011 phishscore=0 bulkscore=0 suspectscore=0 impostorscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2404230031 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240423_130206_884673_927A8AB7 X-CRM114-Status: GOOD ( 19.80 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/23/2024 4:24 PM, Arnd Bergmann wrote: > On Tue, Apr 23, 2024, at 00:48, Marc Zyngier wrote: >> We still support GCC 8.x, and it appears that this toolchain >> does not understand "pauth" as a valid architectural extension. >> After all, it's only been 8 years since ARMv8.3 was released... > > Just to clarify: I'm fairly sure that all supported toolchains > support ARMv8.3 and PACGA, the problem with ".arch_extension pauth\n" > seems to be that it was retroactively made an optional > feature for earlier architecture versions a few years after > ARMv8.3, so most binutils versions we support understand > pacga as an armv8.3 feature but reject the pauth name for the > extension. Kind of agree with Arnd here. Shall the fix just remove the ".arch_extension pauth"? I've tried gcc 7 failed with the pauth name for the extension. After I remove the ".arch_extension pauth" and use "pacga" instruction directly pass the gcc 7 compilation. By the way, have a glance for gcc7/8/9/10 manual, from the gcc 10 manual [1], seems gcc 10 was the first introduced the pauth as the extension name support. https://gcc.gnu.org/onlinedocs/gcc-10.5.0/gcc/AArch64-Options.html#g_t-march-and--mcpu-Feature-Modifiers > >> This results in the NV ERETAx code breaking the build, as it relies >> on this extention to make use of the PACGA instruction. >> >> Work around it by hand-assembling the instruction using a mind-bending >> trick lifted from an old patch by Will. Magic. >> >> Fixes: e09faab353a6 ("KVM: arm64: nv: Add emulation for ERETAx instructions") >> Reported-by: Linaro Kernel Functional Testing >> Signed-off-by: Marc Zyngier > > I usually try to enclose these in a version check like > "#if CONFIG_AS_VERSION >= 22800" so we can be sure we clean them up > whenever the minimum version changes, but I assume you'll remember > this one. > > Acked-by: Arnd Bergmann > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- 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