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 0F45AC43217 for ; Sat, 5 Nov 2022 00:00:39 +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=5ZpPxq0MmHyBGh2ARNzNt2jtg0oaG7jdv1875Gjsr5o=; b=XeeXSCxq+4uBGR rCif+3P9O+4SKe2adUisgGOJtAZudHv9USuMvwWiLWG/soY/cjXZ9dmqIUyKk54Yq7ncSVuJT/0HE /XiDrE3Rt1ihF5YJqbPtFI8KeOWVOW0i2Upe39cI/wfUEmY6V6WDswdPasOa4lP4trODtAUW1cGsZ kAHo6krliT2WL3pkVbgVyIPFAz6FMnjWBBNBIU1smDLGEHn2zpOdtXX77NcqXjtwHP0bPV4ez4vyi eS2PeDbvPuNRfDSsHJtkyvKpNQcslp5LRuTxI1d6IoXufd7gz3AFVONODgNAnomkyBmq8ATZO2wV+ S7JeMLULstwCeyeaxeeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1or6az-005YfY-6H; Fri, 04 Nov 2022 23:59:33 +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 1or6X9-005WlH-Ie for linux-arm-kernel@lists.infradead.org; Fri, 04 Nov 2022 23:55:36 +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 0B37D617E0; Fri, 4 Nov 2022 23:55:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7CB4EC433D6; Fri, 4 Nov 2022 23:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667606134; bh=5VPNc+skSPWq8qoY+wnCgIuGFHDJaNkkRtzfrdtTNNg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l343x2YUokrgtTUdy/Nqxdn+qXKopJJTw77DDrCRGYYlCoVfDFRj8SmVtzoUDlxd3 ey66iY2Uf7QMNqf09NAElzmhWRI4FM+pdcEbt48y4ORrKmhsIDI3B6K07bjqbyxg6k zlGc4z4yJesgE8sUiEtRt5gWVHoCaIcl8JopBdEuXYNNVUtSCBwri/DBs38aVf2uDO jrkBtQDr0C/A1goOJ0z7MIrde0aeSMvAiMKMSL85iaj5e8nr9cRf/lydtHoUI/OP07 t2dhyHeDt3Hv+w7WrVJJetpK6yMl2mmdJ7nLcPK8mnzerOHyzgWYpF5hUH3pNkNtfu wGjQyfoBtDwQg== 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 14/18] arm64/acpi: Mask NMIs while notifying SEA Date: Fri, 4 Nov 2022 23:54:49 +0000 Message-Id: <20221104235453.870573-15-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=1510; i=broonie@kernel.org; h=from:subject; bh=5VPNc+skSPWq8qoY+wnCgIuGFHDJaNkkRtzfrdtTNNg=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBjZaZJhE0EuXiJIrMgap0s1Ly9Q4xLzwiELO5iDn1N 34e8f9aJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCY2WmSQAKCRAk1otyXVSH0BslB/ 0eGnUKhovPqEPoTLX7YN0QyS5U8FgZkn4BmhIQsIAUJqCIMwRApb0rVkSDKq2W7Vg6UIPrmgZ8JCV/ PmStT2MpVTG6MdWD0eOKic3p1LCJh3ghUpWy8JbeIgL8ObKkr2Q9TaYy7TDTX90s2XKFcF1pVXCx2P /wqvh3eYM9iZLLjmVuSxsP/RJmwrZZphsbdZOI4DEfiuqVIqLWQwtTPRY8RJec8kgyzFHE8xM4ERUc jBxDWCMDPDZIEWX6WhCelrxf56tMnrOQDKxylzaf5d1f6IP7SaLZD3jFkEs9u4t76nVGiM0NkbiSP/ 7qb73W9zBiBCG9wZD0OzElTbImkL/U 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_165535_718169_436DE6DD X-CRM114-Status: GOOD ( 14.31 ) 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 Since we report SEA as though it were a NMI mask any actual NMIs that might be delivered during the region marked as a NMI, avoiding any potential confusion that might result from trying to nest them. Handling of SError happens with actual NMIs unmasked so we can unconditionally mask and unmask them. Signed-off-by: Mark Brown --- arch/arm64/kernel/acpi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index a5a256e3f9fe..7bcb8de84096 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -31,6 +31,7 @@ #include #include #include +#include #include int acpi_noirq = 1; /* skip ACPI IRQ initialization */ @@ -378,13 +379,16 @@ int apei_claim_sea(struct pt_regs *regs) return_to_irqs_enabled = interrupts_enabled(regs); /* - * SEA can interrupt SError, mask it and describe this as an NMI so - * that APEI defers the handling. + * SEA can interrupt SError, mask it and describe this as a NMI so + * that APEI defers the handling. Since we are describing this as + * a NMI also ensure that any actual NMIs are masked while doing so. */ + nmi_mask(); local_daif_restore(DAIF_ERRCTX); nmi_enter(); err = ghes_notify_sea(); nmi_exit(); + nmi_unmask(); /* * APEI NMI-like notifications are deferred to irq_work. Unless -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel