Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77916C433EF for ; Tue, 21 Sep 2021 18:38:54 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 37ED261100 for ; Tue, 21 Sep 2021 18:38:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 37ED261100 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ReGdIAfqfjHEIhpNVBcAwmgiDrNMYIZPk6de44hCcWA=; b=AZIHkUNwEgEuWkRk3dSkV4cRqV j+Q/cyDDztxEq60E3BAcnHnNfF/b9tZkIZh/uv62J0KF6p+8FOHin6WGkyXmmPtTxiyMg12NwvWqZ OJU/3G7JtJKBYMuyUpDvow33NCusXbc/Ip9vxMGlh8uSsQdRfA2dnjHdt6WYFOGFrpB4y00q8iKUQ 9sCckgLVZiPAZViDhKpYuGJdvOrabRz1ZeMb2tq5wf9H/UejrN1xkPqoxxO9M+X7lPFxATTmaX/Mw o+UJRVtG6sRG+vN5sFBs+X5aHqGEFhwJaWNx/+0wmZJ1ureEYpDtrcXGhOJC55QosruN0Xkx9sB+G AsE07PMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSkdG-005Usw-8m; Tue, 21 Sep 2021 18:36:42 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mSkdB-005UrY-0Z for linux-arm-kernel@lists.infradead.org; Tue, 21 Sep 2021 18:36:38 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2F70E60ED8; Tue, 21 Sep 2021 18:36:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632249396; bh=i0CHLySyQ3No3txsSXhJRaThyYB//ZzPEANfvdR6esA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y4u4tMehGVih+rT7SqMkV+3sK/nd1z1FvQ1OV8jf80ZLtFmkqkGH3hO3OIAJ6QZXL UXc+84a0GRn1w4Lr+W/DdIH6lCAV0sHCqe6PnrJJH9Zvh1kXdJ4+v90F3Mh2l9RcFR 7NRtzjDft74SSsIfxk3q38t1FCXn/A8xnwcW4j+UJwH0vHD59IDPjqy4ph3vhAHMtV UPmQlhneWT4W0D3leTxBxUIzejqEIMZ5xVjVyfyqoCG84G1N1fEEHUId7x9vH+GqVD CtT8bujX9KjAFIiFmFXag59fu1gPfs4KHIupkkS+C1RMrdnnGNEU3ehPukvUrm4RJk XDRxuCuzrUbkA== Date: Tue, 21 Sep 2021 19:35:52 +0100 From: Mark Brown To: dann frazier Cc: Catalin Marinas , Will Deacon , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] arm64: Generate cpucaps.h Message-ID: <20210921183552.GC9990@sirena.org.uk> References: <20210428121231.11219-1-broonie@kernel.org> MIME-Version: 1.0 In-Reply-To: X-Cookie: Will it improve my CASH FLOW? User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210921_113637_130535_8B83F2C2 X-CRM114-Status: GOOD ( 22.10 ) 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: multipart/mixed; boundary="===============4796160165216963057==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============4796160165216963057== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NU0Ex4SbNnrxsi6C" Content-Disposition: inline --NU0Ex4SbNnrxsi6C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Sep 21, 2021 at 12:08:11PM -0600, dann frazier wrote: > On Wed, Apr 28, 2021 at 01:12:31PM +0100, Mark Brown wrote: > > This will result in a renumbering and reordering of the existing constants, > > since they are all internal only the values should not be important. The > > reordering will impact the order in which some steps in enumeration handle > > features but the algorithm is not intended to depend on this and I haven't > > seen any issues when testing. > Unfortunately I believe I've hit a regression[*] due to such an > ordering dependency. UNMAP_KERNEL_AT_EL0 currently needs to be > processed after WORKAROUND_CAVIUM_27456. ThunderX systems are > incompatible with KPTI, so unmap_kernel_at_el0() bails if > WORKAROUND_CAVIUM_27456 is set. Because of the sorting, > WORKAROUND_CAVIUM_27456 will not yet have been considered when > unmap_kernel_at_el0() checks for it, so the kernel tries to > run w/ KPTI - and quickly falls over. > I've verified that reordering cpucaps to move WORKAROUND_CAVIUM_27456 > just above UNMAP_KERNEL_AT_EL0 restores the old behavior. I'm not sure > of the right way to address this - perhaps unmap_kernel_at_el0() could > check cavium_erratum_27456_cpus[] directly instead of keying on the > ARM64_WORKAROUND_CAVIUM_27456 cap? Ugh, right. Another option would be to do something like rename to CAVIUM_WORKAROUND_27456 which would be inconsistent naming and but would sort things in a way that gets the checks to run in the order we're relying on but either works for me. Neither is great. It'd be really good to get more coverage of the enterprise systems in KernelCI or similar so we can catch issues like this more easily. --NU0Ex4SbNnrxsi6C Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmFKJgcACgkQJNaLcl1U h9AceAf/adkQWoraF3J6Huc+VLvI7AXo8gr6A0UU5Hb710pFm4+naUq3BqavSA9W 0CoxACH4mj2/JuV4v8fLWbvPeD8Y+T/kTULSGA2UfHd42GdgjHrQn7c9fWOi+BnZ Vr52OtTRTIO2LmgdVZLW5cgH70QbSD3vDucYdZVhiW1QD/JA1XPKPateTi6LggaT LSqxpiw0vCu5ZOofWyK8sN4yuo/0U4E7sdTYCuYrv3y+HoZfvlkDiLhcR7od+pbt 2NkIIt5e9+wVltqIKGBO0vieFdq9mgdIxwMzTPFNCRVKPKpawYOkf/ukM6yZFwTs Bln55L6WBlUoQBVJFdcPrsyIStW+aA== =NBid -----END PGP SIGNATURE----- --NU0Ex4SbNnrxsi6C-- --===============4796160165216963057== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============4796160165216963057==--