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 33D81C433FE for ; Fri, 4 Nov 2022 23:57:15 +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: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iwex2Xm7JYOKBSoRtZCiVWusSib070IMkkks5lTWFsE=; b=S6sjl+YcEyHvpA H5gzMQKEolhxxWY0tXmW/KiQbSvl3eGLfhm+hqsoDUCn2IbaTK1sVw9NFMq/fXjCyBUbXTMCT2AeX iooYaocn/Kvw2V43eDIwuN8Whje2lsq5nNO0hl4zPE5DERxfK6/UhRV0cYT0ggekxoUrh79n3MDXN WOOK45JiNCDV+sx8Jgrm79/b9dOS3lAxyZMyh7Pb40Wx7L4cP+uPXMS1l0Y/a5iWdCpBNMo6tA4NK Qkrwx6ivMjmNPXN/QbAA9p3ZSATwyCvv+NMFW9mNow1WsWad5rbV5jSGsDvXmU4aM5wzm03b+PCYK hmgWPDO88/5RpXCUv0ig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1or6Xk-005X26-75; Fri, 04 Nov 2022 23:56:12 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1or6Ws-005Weu-1c for linux-arm-kernel@lists.infradead.org; Fri, 04 Nov 2022 23:55:19 +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 ams.source.kernel.org (Postfix) with ESMTPS id AB89CB83012; Fri, 4 Nov 2022 23:55:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65649C43140; Fri, 4 Nov 2022 23:55:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667606115; bh=0syKUcI+2B2tD4tFfEA15/8QN3gSt7/4BPz+VWR3zes=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cLwuML18sX5d/OtB0OEMk9N9tfPkPazKnc/7+mjDPbH+cglqmOWljRa0aSJDrkqHV ghF+93W+EB2UI+WSQSnqB9sqZI65XSQeLfyQZ5cdkMt/ZnHMn5XQZJQDMcFP/Zmr0x orQnUAPBQEl8cM2j3yeF4qYIc6JT0Bp+6YxB50bFWPspZuBF6STVwooBJyf6hXj2Hi MV2k+LqzZF9Z5r3owHB9UIEfOlvcwWClKOIJlrzTPU7gTRF0fShcumMgwOFo1YRbBf NZO7QI4XKHe8YpITMz6/seHYxi1+I/HSLrBPoQ9YbKBydnA9jg6J/DQYnieMzhVPFp ssUfkJbiiiH8g== From: Mark Brown To: Catalin Marinas , Will Deacon , Marc Zyngier Cc: Lorenzo Pieralisi , Mark Rutland , Sami Mujawar , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Mark Brown Subject: [PATCH v1 06/18] arm64/hyp-stub: Enable access to ALLINT Date: Fri, 4 Nov 2022 23:54:41 +0000 Message-Id: <20221104235453.870573-7-broonie@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221104235453.870573-1-broonie@kernel.org> References: <20221104235453.870573-1-broonie@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1041; i=broonie@kernel.org; h=from:subject; bh=0syKUcI+2B2tD4tFfEA15/8QN3gSt7/4BPz+VWR3zes=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBjZaZApTGe27p+Rp8FnHy47ni/l138ihq9e6U2X4lC p6nLsoaJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCY2WmQAAKCRAk1otyXVSH0HTvB/ 0VSwbqdd/+2AgsKEpgBMOvMuDMd63rmQD3nLK01iqO/4qt9iAQ/has6n4QEUrdYeQEjEJiHUF6Uk1t 7YAcPftMqcCD/77MeACTC8DoAZVo0OXN6GlJfPL/FsqCYqe4BSJXetqFoh7RcB5qjCH2bIBqusGPFh DZkIIeHrY+JM2CQ0PHKAPkWOw2xVm6gOeOmd/4EoW9ypRWUIIJ0Mv3KLnEIKSdzsxJthCQU3UwLGjh TouGmLAq4+GC563pNWiBmQrn424uInOsQHcaJm0Iq3AU3l//PRxxgyzF8iDMItXiHJ8LdOqWEXzXnW QrKf0EECIpxFOPeFTrUxdm8HSGtaHt X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221104_165518_251964_49E8A36A X-CRM114-Status: GOOD ( 11.62 ) 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 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 +.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 + msr_s SYS_HCRX_EL2, x1 +.Lskip_nmi: + // nVHE? No way! Give me the real thing! // Sanity check: MMU *must* be off mrs x1, sctlr_el2 -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel