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 3C090C4332F for ; Mon, 12 Dec 2022 14:41:28 +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=SgY349HW97Chrod93KU4d5mNamoV+qapx4pc8rGh/OA=; b=smL+/KebmNBPm/ UOhXIj8i7VbGVGnzumeQryXDotn93zKa3Y2uvxGpKILGrUosXfHa3hPbdT2eS0xSL+f4TkvGBkuop 2FtrWBAi5zQi1aZHezJLfRQRlF1MmFJAPmh9E+sVUtAbZR18wbUmKsuseckJK9xGFxC2p09iGuegh t83ez16QXItT6FGP3b+TpungLHv8yRItouBd1P51mJanShJpNJRi7qVWOw0wGOGkKQYcnDqUh2ka+ RIZXJH2XQK4ve8Ld+h/PNQEQxLI08pgU7R3sF6a2EASXefo5xPKDqghNU9gHDdjLouP4pQZchec4B cz4SvXll2dUHvW5m44vA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p4jyf-000AMb-KB; Mon, 12 Dec 2022 14:40:21 +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 1p4jyb-000AI0-6M for linux-arm-kernel@lists.infradead.org; Mon, 12 Dec 2022 14:40:18 +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 533C61FB; Mon, 12 Dec 2022 06:40:56 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.40.60]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4615D3F71E; Mon, 12 Dec 2022 06:40:14 -0800 (PST) Date: Mon, 12 Dec 2022 14:40:08 +0000 From: Mark Rutland To: Mark Brown Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Lorenzo Pieralisi , Sami Mujawar , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: Re: [PATCH v2 10/14] arm64/nmi: Manage masking for superpriority interrupts along with DAIF Message-ID: References: <20221112151708.175147-1-broonie@kernel.org> <20221112151708.175147-11-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221112151708.175147-11-broonie@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221212_064017_299702_2F4C0FEA X-CRM114-Status: GOOD ( 10.35 ) 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, Nov 12, 2022 at 03:17:04PM +0000, Mark Brown wrote: > As we do for pseudo NMIs add code to our DAIF management which keeps > superpriority interrupts unmasked when we have asynchronous exceptions > enabled. Please, no. NAK to pretending this is part of DAIF. The existing hacks to bodge pseudo-NMI into the DAIF management code are convoluted, difficult to maintain, and they have known cases where they *cannot* do the right thing. Those existing hacks have proved to be more trouble than they're worth, and continuing down that path makes things worse. We must clean up the existing approach *before* we add the real NMI support. As mentioned elsewhere, I think this means reworking the way we manage exception masks, and at least: (a) Adding entry-specific helpers to manipulate abstract exception masks covering DAIF + PMR + ALLINT. Those need unmask-at-entry and mask-at-exit behaviour, and today only need to manage DAIF + PMR. It should be possible to do this ahead of ALLINT / NMI support. (b) Adding new "logical exception mask" helpers that treat DAIF + PMR + ALLINT as separate elements. This way we can always save+track all elements if we need to (e.g. for irqflag tracking), but we never have to fake up a DAIF element. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel