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 7E188C4332F for ; Mon, 5 Dec 2022 17:51:41 +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:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=V9kWD83myyyelgzZlVRq6P6AGgOeG/grUHJPi/HtJCc=; b=r4ZVAuQXz3ysev 3JZpc4zUjX7sCsn1GAsS4Q88Ch6xbXZQsw7LmDzZTfRuyyubCHkz7yr4RVFdfdBRWuhx5e5MR8gr6 GJL/vSK2JS7dfa77RGsVFf36TjVGva237aiogjHg+lA1k+BmLlTbA2oPgGNcK147M2ixFIE+vNnsG J+0vTF3JY398I7HJy76LrwRhnOb9d0j3oaNS1i9Uqo5SM35yWosJAX6fbVvZK5034Wa7RW/RmW/Vy QvoTDqWcpa2jO1wANcUBCs58u11RhF07XirZ6Q7rxxYDDl1mk5jXDWC1jJDVvmo67Unp2Mb8rysQa Dv3p5N6xxov82Hjklz3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2Fc2-007pfo-R1; Mon, 05 Dec 2022 17:50:42 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2Fbz-007pYX-Lq for linux-arm-kernel@lists.infradead.org; Mon, 05 Dec 2022 17:50:41 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 09BAD612A5; Mon, 5 Dec 2022 17:50:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66F46C433D6; Mon, 5 Dec 2022 17:50:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670262638; bh=RjRusTgDu+5A3y4QhS3DIyGHr9qWxQFZ8RHadBBdFPk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=cHPiFqf6Aw157ls+P9bJZmcslUqOdYeCgypNMpdM5fgSetbyi8UaFafLm+CgD4MvL 4iBh8ZkHtfV+QpK/gS5Iz63V8SWP5LffCY5PXmRKwBMrZPdfzF+TbbSOpzBXRf8Md8 wggGZ9YqbWA5R2otbA39w7tV82F4hdTA9yZOHLCb2kMrHOpbCKJ4nzfMTmhZ2mz+x9 xZ8MfwunROzI2NIjBQ9sco/b3TzmxfgaqLsYF/J2lSKGbkrDhL12d+fZZmSCxUcr4A ElwR0pixGAl7kHES45K94RUG4XdbuyQg+g2m0J49DnMT+JEYH6kfpq/9ilX9lH97Ja Ccd7Eo6hMtFew== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1p2Fbw-00AdaZ-2r; Mon, 05 Dec 2022 17:50:36 +0000 Date: Mon, 05 Dec 2022 17:50:35 +0000 Message-ID: <86sfhtloyc.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown Cc: Catalin Marinas , Will Deacon , Lorenzo Pieralisi , Mark Rutland , Sami Mujawar , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: Re: [PATCH v2 06/14] arm64/hyp-stub: Enable access to ALLINT In-Reply-To: <20221112151708.175147-7-broonie@kernel.org> References: <20221112151708.175147-1-broonie@kernel.org> <20221112151708.175147-7-broonie@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: broonie@kernel.org, catalin.marinas@arm.com, will@kernel.org, lpieralisi@kernel.org, mark.rutland@arm.com, Sami.Mujawar@arm.com, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221205_095039_834916_54250700 X-CRM114-Status: GOOD ( 20.39 ) 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 Sat, 12 Nov 2022 15:17:00 +0000, Mark Brown wrote: > > In order to use NMIs we need to ensure that traps are disabled for it so > update HCRX_EL2 to ensure that TALLINT is not set when we detect support > for NMIs. > > Signed-off-by: Mark Brown > --- > arch/arm64/kernel/hyp-stub.S | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-stub.S > index 2ee18c860f2a..4e0b06467973 100644 > --- a/arch/arm64/kernel/hyp-stub.S > +++ b/arch/arm64/kernel/hyp-stub.S > @@ -151,6 +151,18 @@ SYM_CODE_START_LOCAL(__finalise_el2) > > .Lskip_sme: > > + // NMIs > + __check_override id_aa64pfr1 ID_AA64PFR1_EL1_NMI_SHIFT 4 .Linit_nmi .Lskip_nmi Err.., What makes sure that x1 contains id_aa64pfr1_el1, as per the big fat warning at the beginning of the file?? If you have SME, x1 will contain some other junk... Really, this must be written as: check_override id_aa64pfr1 ID_AA64PFR1_EL1_NMI_SHIFT .Linit_nmi .Lskip_nmi > +.Linit_nmi: > + mrs x1, id_aa64mmfr1_el1 // HCRX_EL2 present? > + ubfx x1, x1, #ID_AA64MMFR1_EL1_HCX_SHIFT, #4 > + cbz x1, .Lskip_nmi > + > + mrs_s x1, SYS_HCRX_EL2 > + and x1, x1, #~HCRX_EL2_TALLINT_MASK // Don't trap ALLINT A nicer way of writing this is: bic x1, x1, #HCRX_EL2_TALLINT_MASK M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel