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 842BEECAAD5 for ; Mon, 5 Sep 2022 10:19:08 +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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JpK7w/Wc9+ginsyAQEt88+TO94CvwcmjQpJ9gwphqpc=; b=gnOzo/VAJeROxy AW+QmKdfJZgBiyytwuDIz/XslNMTXvS39IOLWhmXSXTdKBbcoxl+fNUQAS7F3PpbpvxYWwlpVH4dk ljax427m/QbBJ89ZpiCjDLQK/F7ykl/jDSlTu29fpto/JMAt4cWxZPigPAkRK03iO3kRFa6RXWZd0 R4fj4bzq/NvrTtK2xw9VSd9wiPcVz4BDITIAlN15lWIIavds0ptvt1WHQ77Cnu0yoJSL7wBi17pHK lw0WWNV1xZNKPjJrCuGNmN5JniJvJdxnDU2tXwnqp8lAwkdm8cEnSC9b2xqxYCt/DZgRBFYaNhdav wIY44J0ideU1NgOupvug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oV9An-0001lb-R0; Mon, 05 Sep 2022 10:17:46 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oV7kc-00EueL-5p for linux-arm-kernel@lists.infradead.org; Mon, 05 Sep 2022 08:48:48 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1044EED1; Mon, 5 Sep 2022 01:46:40 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.76.120]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7CF813F534; Mon, 5 Sep 2022 01:46:32 -0700 (PDT) Date: Mon, 5 Sep 2022 09:46:29 +0100 From: Mark Rutland To: Joey Gouly Cc: linux-arm-kernel@lists.infradead.org, ardb@kernel.org, catalin.marinas@arm.com, james.morse@arm.com, maz@kernel.org, will@kernel.org, nd@arm.com Subject: Re: [PATCH 3/9] arm64: alternatives: proton-pack: prepare for cap changes Message-ID: References: <20220901151403.1735836-1-mark.rutland@arm.com> <20220901151403.1735836-4-mark.rutland@arm.com> <20220902161932.GB10647@e124191.cambridge.arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220902161932.GB10647@e124191.cambridge.arm.com> 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 Fri, Sep 02, 2022 at 05:19:32PM +0100, Joey Gouly wrote: > Hi Mark, > > On Thu, Sep 01, 2022 at 04:13:57PM +0100, Mark Rutland wrote: > > The spectre patching callbacks use cpus_have_final_cap() internally within > > has_vhe(), and subsequent patches will make it invalid to call > > Remove the 'internally within has_vhe()', a copy paste error from the previous > commit. Whoops; removed. > Otherwise: > > Reviewed-by: Joey Gouly Thanks! Mark. > > > cpus_have_final_cap() before alternatives patching has completed. > > > > In preparation for said change, this patch modifies the spectre patching > > callbacks use cpus_have_cap(). This is not subject to patching, and will > > dynamically check the cpu_hwcaps array, which is functionally equivalent > > to the existing behaviour. > > > > There should be no functional change as a result of this patch. > > > > Signed-off-by: Mark Rutland > > Cc: Ard Biesheuvel > > Cc: Catalin Marinas > > Cc: James Morse > > Cc: Joey Gouly > > Cc: Marc Zyngier > > Cc: Will Deacon > > --- > > arch/arm64/kernel/proton-pack.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c > > index 40be3a7c2c531..8010b2e573fac 100644 > > --- a/arch/arm64/kernel/proton-pack.c > > +++ b/arch/arm64/kernel/proton-pack.c > > @@ -586,7 +586,7 @@ void __init spectre_v4_patch_fw_mitigation_enable(struct alt_instr *alt, > > if (spectre_v4_mitigations_off()) > > return; > > > > - if (cpus_have_final_cap(ARM64_SSBS)) > > + if (cpus_have_cap(ARM64_SSBS)) > > return; > > > > if (spectre_v4_mitigations_dynamic()) > > -- > > 2.30.2 > > > > > > _______________________________________________ > > linux-arm-kernel mailing list > > linux-arm-kernel@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel