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 26139C4332F for ; Tue, 13 Dec 2022 13:16:26 +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-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-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EycLr7dKgCwDx8J9b8MdG5Gs0utxrEd7I3FkfXxu2yY=; b=P+QZhgOEfcwXK1JJ+hvBZviBgc kaPmLcFWM8yfH4RHvlEN5B0bRM3nFcvBiPpzeLaa7wp259DJ/lg4Vco2y1gZI+wYQiY8WLeMT6+M5 pMjhHhjw+/8zSXTX+l9nMZjQKJID694CFwbMfHlv98g5yGQkpsClwtq1LcW0dGHAk0QtzUsILQONc pYh3enlSw3UuJ54YvqU23DVQtnohpVyOGs5eUYEn1CnJCvijF1HTeLP+ZzoZyKvex1y0Wkyz9E9pV OqpJfnK7UBZzF+gPgasUHdk3GnuAF1HqdBTIBS7ibgh8DWmJP0Rc3oyF7IHdFYWQmSDlTIQUJZWK0 zarSxaTw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p557v-000Ba5-As; Tue, 13 Dec 2022 13:15:19 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p557r-000BVh-En for linux-arm-kernel@lists.infradead.org; Tue, 13 Dec 2022 13:15:17 +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 EF237B81184; Tue, 13 Dec 2022 13:15:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2229FC433A4; Tue, 13 Dec 2022 13:15:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670937310; bh=ny2LP1+qhbiF25Fg6TL6Uyqx2whwSG+lVJwxhXmWS7Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Kn5pl4xlY0nLg6Hvi6+456GuKAhO0saTMygWttz/RNLWKgC2uS5D96tIB2OtaoI4n mss0b1HEtm/My1yvnX/IfpYo9N+ds240ctHFq6dFCYbm/xkCUg2u4V+qMbTh2NJwLL YXOPX1tphUo0UOQMl4NQT/iP7w0s6Y8WIH1pwaHhSp7j8wFTjGdfWkDCcL/qJfkzR9 6CFDu3GQRcgW/94o1JfilkwECoyFafvoHO0ECxCkrmG2EsXkdzw4AvtgcR07NYktPf NsHlq/piRcpRFFBOm02S4b3tNE7RbXafPr/RhBipTPx+h5rKvQysNNH2VgPm4kEfvt dEiVraSIEEfTw== Date: Tue, 13 Dec 2022 13:15:03 +0000 From: Mark Brown To: Lorenzo Pieralisi Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Mark Rutland , 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 In-Reply-To: X-Cookie: Edwin Meese made me wear CORDOVANS!! X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221213_051515_841770_439CEBC4 X-CRM114-Status: GOOD ( 31.46 ) 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: multipart/mixed; boundary="===============0374638684466260995==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============0374638684466260995== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YwpPvNz3I82Uo82R" Content-Disposition: inline --YwpPvNz3I82Uo82R Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 13, 2022 at 09:37:56AM +0100, Lorenzo Pieralisi wrote: > On Mon, Dec 12, 2022 at 02:03:33PM +0000, Mark Brown wrote: > > A first pass suggests that we should be handling this like we do for > > other preemptions and returning early from arm64_preempt_schedule_irq() > > if ALLINT is masked. If we are handling a regular IRQ then ALLINT will > > be unmasked and we'll call into preempt_schedule_irq(), if we're > > handling a NMI then ALLINT will still be masked so we don't attempt to > > schedule. I've pushed out a change which does this but not yet properly > > tested it. > Yes that's what should happen (actually if we are handling an NMI we > should not even get to the point where a decision about preemption is > made el1_interrupt() just returns). OK, great. It would be good to understand where the preemption is happening, I suspect you're hitting it from some place I'm not. I did verify that I'm seeing preemptions during boot, it just wasn't stalling for me. > > Do you have any specifics on how you're seeing problems? You did > > mention boot stalls offline but I've not been able to to reproduce this > > locally in a way that I can identify (based on your mail now I've made > > sure I've got preemption enabled). > defconfig, barebone rootfs, boot stalls (because we are scheduling with > IRQs off and there is nothing clearing ALLINT in the preemption path > so system hangs). > I don't know why you can't reproduce it don't know if it is the Kconfig > or file system configuration (or the FVP params - for this to show up > FEAT_NMI must obviously be enabled - I am testing the branch Marc posted > so that I can test the vGIC patches but this is definitely not a vGIC > bug). It might be Marc's changes I guess, I didn't pull them in but I don't see anything there that should be doing anything without running a guest either... --YwpPvNz3I82Uo82R Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmOYetcACgkQJNaLcl1U h9AtMwf/eYU5UrTg4kHnD8mnqZdBmFV15qEcuNjgzqVn5TAo3qx3zN3hxRbMO9TP uzvK7VzLns+JgsVJ/jNO1kcfsUqGLpBKGhHqNlDb/as7iN95QaRvQSHQTp35aOE4 /Nnzled+t1jjJ7fK5a9y9P921hAmc4BKxUlX5KuvkHaTAtJ8TCYjh2FTBQqnZU+R X8uMZaqV91xkDcf4A+3Tx3MQC9KVieMpsQiyTwkOMKC6qJSZlStWrNLWXGk02oc+ vKN31vog+sB3Qw4zeEAp2wrqcYA/mEbWEOcJlaAGmDukv656s0wo5SBuaqy/6TiO gw+OFTlReEsnFVCEOSS1SdUE570kUQ== =zZ7z -----END PGP SIGNATURE----- --YwpPvNz3I82Uo82R-- --===============0374638684466260995== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============0374638684466260995==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 219DA33E1 for ; Tue, 13 Dec 2022 13:15:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2229FC433A4; Tue, 13 Dec 2022 13:15:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670937310; bh=ny2LP1+qhbiF25Fg6TL6Uyqx2whwSG+lVJwxhXmWS7Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Kn5pl4xlY0nLg6Hvi6+456GuKAhO0saTMygWttz/RNLWKgC2uS5D96tIB2OtaoI4n mss0b1HEtm/My1yvnX/IfpYo9N+ds240ctHFq6dFCYbm/xkCUg2u4V+qMbTh2NJwLL YXOPX1tphUo0UOQMl4NQT/iP7w0s6Y8WIH1pwaHhSp7j8wFTjGdfWkDCcL/qJfkzR9 6CFDu3GQRcgW/94o1JfilkwECoyFafvoHO0ECxCkrmG2EsXkdzw4AvtgcR07NYktPf NsHlq/piRcpRFFBOm02S4b3tNE7RbXafPr/RhBipTPx+h5rKvQysNNH2VgPm4kEfvt dEiVraSIEEfTw== Date: Tue, 13 Dec 2022 13:15:03 +0000 From: Mark Brown To: Lorenzo Pieralisi Cc: Catalin Marinas , Will Deacon , Marc Zyngier , Mark Rutland , 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> Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YwpPvNz3I82Uo82R" Content-Disposition: inline In-Reply-To: X-Cookie: Edwin Meese made me wear CORDOVANS!! --YwpPvNz3I82Uo82R Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 13, 2022 at 09:37:56AM +0100, Lorenzo Pieralisi wrote: > On Mon, Dec 12, 2022 at 02:03:33PM +0000, Mark Brown wrote: > > A first pass suggests that we should be handling this like we do for > > other preemptions and returning early from arm64_preempt_schedule_irq() > > if ALLINT is masked. If we are handling a regular IRQ then ALLINT will > > be unmasked and we'll call into preempt_schedule_irq(), if we're > > handling a NMI then ALLINT will still be masked so we don't attempt to > > schedule. I've pushed out a change which does this but not yet properly > > tested it. > Yes that's what should happen (actually if we are handling an NMI we > should not even get to the point where a decision about preemption is > made el1_interrupt() just returns). OK, great. It would be good to understand where the preemption is happening, I suspect you're hitting it from some place I'm not. I did verify that I'm seeing preemptions during boot, it just wasn't stalling for me. > > Do you have any specifics on how you're seeing problems? You did > > mention boot stalls offline but I've not been able to to reproduce this > > locally in a way that I can identify (based on your mail now I've made > > sure I've got preemption enabled). > defconfig, barebone rootfs, boot stalls (because we are scheduling with > IRQs off and there is nothing clearing ALLINT in the preemption path > so system hangs). > I don't know why you can't reproduce it don't know if it is the Kconfig > or file system configuration (or the FVP params - for this to show up > FEAT_NMI must obviously be enabled - I am testing the branch Marc posted > so that I can test the vGIC patches but this is definitely not a vGIC > bug). It might be Marc's changes I guess, I didn't pull them in but I don't see anything there that should be doing anything without running a guest either... --YwpPvNz3I82Uo82R Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmOYetcACgkQJNaLcl1U h9AtMwf/eYU5UrTg4kHnD8mnqZdBmFV15qEcuNjgzqVn5TAo3qx3zN3hxRbMO9TP uzvK7VzLns+JgsVJ/jNO1kcfsUqGLpBKGhHqNlDb/as7iN95QaRvQSHQTp35aOE4 /Nnzled+t1jjJ7fK5a9y9P921hAmc4BKxUlX5KuvkHaTAtJ8TCYjh2FTBQqnZU+R X8uMZaqV91xkDcf4A+3Tx3MQC9KVieMpsQiyTwkOMKC6qJSZlStWrNLWXGk02oc+ vKN31vog+sB3Qw4zeEAp2wrqcYA/mEbWEOcJlaAGmDukv656s0wo5SBuaqy/6TiO gw+OFTlReEsnFVCEOSS1SdUE570kUQ== =zZ7z -----END PGP SIGNATURE----- --YwpPvNz3I82Uo82R--