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 8CD05C4332F for ; Fri, 4 Nov 2022 23:59:59 +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=7HzMu8T1IJmJ3onubOngLPX6JwE4UFP5iiKLBXEDLtA=; b=Et66Dn0HSl+Zhl Pl9V8errquJOOSmCTxZYKVa0/kDsCBV57p0z2FwLj4k3hufAZ2P5EWGdxOWLbSZK89k//g+NED3B4 qZsGWBp4zg8OjC/4Bosvj0TPRf5XrXxZ3XdHp2B3BZLX48nvbP5R2fJY+FUTHOXDf2ii81iV6Hbqe Bcao1vPS/3oRDxneffdd/S0w6u9BrfbIHK+SJAgta7VHVslyJhmJQj4fD/bFXyJ8srhOsBUsbgbFT xt0i3njHS8B/z6jzosTtAkccYjhz+8ei2uIFXcJtwalTlaJCHVOcRkg7/jtzISWQ3VzEiBSiPhV1r e9mZhRtl/p+eTjmhcf/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1or6aM-005YOc-08; Fri, 04 Nov 2022 23:58:54 +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 1or6X7-005WkX-7P for linux-arm-kernel@lists.infradead.org; Fri, 04 Nov 2022 23:55:34 +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 9AC966239D; Fri, 4 Nov 2022 23:55:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CA9AC433C1; Fri, 4 Nov 2022 23:55:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667606132; bh=Mc4gMuQhxaNyGI7uvGxITbUYcrf+p03tM7rBPgY1RfI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E2zKoa3NrUKWurK9LqKV6y+a7hyZKrnOQNoNRs4T64YPW/s53hJRlvqobgRtw+GeD byYSsUXrIRyOmWcDHJU9iL8AQ9VnXiAM0kAwozKDJ8rpgUi95mXCWUTgD5xfJETEN5 4XTcErd/vA62P5Bq5vJMTaxT3ylHWsWwXq8ZwvXooBcGxU5AsrCdfnUriu1JJmTM7k p49vTRYKopxELKHxGoYtgsPMZEEPwjMJi8L+dy7vL8gK+nQlLO6GG35kJVRKOQNQ5H ckniLNJJTLYjsEXl4F3yBE0XeV0fP0EuCsvU8uFROZYLCYoZULzT8g3zDbTJknJp49 +u45z9sBNah0Q== 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 13/18] arm64/kexec: Mask NMIs before starting new kernel Date: Fri, 4 Nov 2022 23:54:48 +0000 Message-Id: <20221104235453.870573-14-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=1072; i=broonie@kernel.org; h=from:subject; bh=Mc4gMuQhxaNyGI7uvGxITbUYcrf+p03tM7rBPgY1RfI=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBjZaZINXIXCn9u3V1GjgMH38itqdVBNrTOA9UDX+5t l+OaSwKJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCY2WmSAAKCRAk1otyXVSH0MV0B/ 4xDzXweqxLwJijNLITZuJXx1ng8vLpxyjNjtiTrf2/BJnFc2hhwVBKOIu+AQXysCEDXGGUxpIURPrV CSbPmBnm4DoV1WxrBSi5APbOK2JxSFccEriYg2Qw1oLGa1yuhP9x+vYkDLT6AEpS/9QCoYj2h04Sda efxAoMlSkzlBfn7GDfn+0AiXFYRDAVv6L8LMb52WIvOBYlwDu2y/GL6EUpmRcYXltJ7KsDgOIGy0uV Cb9/SGMVEnb3yMrN8aA4KCTK+EqIrAtF7e3pDRA73SOhFCRXQc2F4LIepEUEtOP1ERZp03jd9oQEWU Fjobjhu2MqyungT/O95+qXlB4jTHqq 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_165533_328639_D05326E1 X-CRM114-Status: GOOD ( 13.27 ) 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 Before we jump into the new kernel we mask interrupts with DAIF so we don't attempt to handle anything very early in init, if NMIs are enabled then do the same for NMIs. The new kernel is responsible for initialising SCTLR to a value it supports, this will include disabling NMIs if they are not in use. Signed-off-by: Mark Brown --- arch/arm64/kernel/machine_kexec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c index ce3d40120f72..6ae2a0b3c1df 100644 --- a/arch/arm64/kernel/machine_kexec.c +++ b/arch/arm64/kernel/machine_kexec.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -190,6 +191,7 @@ void machine_kexec(struct kimage *kimage) pr_info("Bye!\n"); local_daif_mask(); + nmi_mask(); /* * Both restart and kernel_reloc will shutdown the MMU, disable data -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel