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 3801FC4332F for ; Wed, 9 Nov 2022 15:37:08 +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=UVx5oXjuZNE+xcAWyZHqW/+9rAFAScXxK3N0BQW7oGY=; b=xtAtJ5IOZQgHtPEls9lmDZNhxt lXL0Q08K66burF2GVmHBi6KtIdut4vV/EmkkOfB9HULc6pChbkW/iO8kqq73ZjrlcP0o2aFBoDngs LO+VUgpY5U0fVcS1UxsJjydU169DjfLELnrXfEWrFqfbnHEc4JrNeITy2k2jTO3bGATgxhGljiXa+ otdFTTpFJf5gRn7q2FEEWtYoQ4u2tGMpvPF75P0X7X0o93qyO024I2vGfHL1Yb7Tpcf4iiXmtuWuB xE1ciHb6GcBdWmQvCm6GGs51Oxx5LdZRTUZQ0+ySZOXKWJ0dt86af4eRe6vZEmV3PcGQ7r39U8IR0 V3Q/bGqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osn7B-00EeIc-QR; Wed, 09 Nov 2022 15:35:45 +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 1osn78-00EeED-Qm for linux-arm-kernel@lists.infradead.org; Wed, 09 Nov 2022 15:35:44 +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 5E936B81F2C; Wed, 9 Nov 2022 15:35:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E5CDC433D6; Wed, 9 Nov 2022 15:35:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668008131; bh=hYMiDsJa2f4ZfHhnOl77cxxlzOWS17sgzNdCOp/Y48U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PSTduVNVsfVtgNH2SSurZ+YdKrr2yKzyF9bh+m+pnnJoX1oBht96JgFRLxOeBbZX8 tT0guIqOuCTQX7TqSXiUQiOcQXIIh9yfqwpwpW2jZs8GwHdldm2HV6Y72a4dgSx/D2 MbNl5CsuAvzNkwAV9WxcfLuksopCTVmeKnOsJy8d3iKwpsYhqfLpmc6oL3GDJzgb3J uF2jj6rJkEbc7MsTWN2Rrx2lylssxgx+zrBxVuLkkiWAbKiTp5BpBL0PGDs7aL3HX0 OHppEWcGm3N3UHHoV/kuMOjrAX2UwIikWhFnA0H1HFVCprjMxbJLrTnRG6AM8ftwlw dgIDXI+v9yQgA== Date: Wed, 9 Nov 2022 15:35:25 +0000 From: Mark Brown To: Marc Zyngier Cc: Catalin Marinas , Will Deacon , Lorenzo Pieralisi , Mark Rutland , Sami Mujawar , Thomas Gleixner , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v1 00/18] arm64/nmi: Support for FEAT_NMI Message-ID: References: <20221104235453.870573-1-broonie@kernel.org> <87r0ygfh2s.wl-maz@kernel.org> MIME-Version: 1.0 In-Reply-To: <87r0ygfh2s.wl-maz@kernel.org> X-Cookie: Minimum charge for booths. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221109_073543_166622_4D5C3B5C X-CRM114-Status: GOOD ( 46.12 ) 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="===============7342952790727289361==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============7342952790727289361== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Qxpg+kLN1hqH5UmZ" Content-Disposition: inline --Qxpg+kLN1hqH5UmZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 06, 2022 at 11:38:51AM +0000, Marc Zyngier wrote: > Mark Brown wrote: > > interrupts of any kind to add masking for NMIs. This masking is not > > added to our standard interrupt masking operations since that would > > result in widespread masking of NMIs which would undermine their value. > > Given that there's a large amount of kernel code a good proportion of > > which I'm not terribly familar with it is likely that this area of the > > series needs attention in review as there may be be be areas that have > > been missed or misunderstood. > Can you at least clarify why the no-quite-NMI cannot follow the > pattern established by the pseudo-NMI support? I would have expected > the critical sections to strictly map between the two so-called-NMI > implementations. That's fair, I'll expand on this topic in the cover for next version. It is basically similar, there's a few differences where I couldn't convince myself that we were intentionally masking NMIs like el0_svc_common() and it did seem like we wanted to control things separately during entry given the separate report path we have with the architected version. It's possible I've completely misunderstood this one way or another. I did look at a couple of alernatives that had more overlap. I looked at pulling the pNMI code out of the DAIF handling but given the implementation the benefits seemed unclear for the complexity given that it is actually working with DAIF. I did also strongly consider putting the NMI handling into the DAIF handling but that was making it difficult to distinguish the handling of architected NMIs and the implicit coverage didn't seem ideal, I could have another spin through that approach though - I was on the edge with the approach there. It sounds like you'd really prefer that one. > > Using this feature in KVM guests will require the implementation of vGIC > > support which is not present in this series, and there is also no usage > > of the feature at EL2. While FEAT_NMI does add a new writable register > > ALLINT the value is already context switched for EL1 via SPSR_EL2.ALLIN= T=20 > > and we can't trap read access to the register so we don't manage the > > write trap that is available in HCRX_EL2.TALLINT. Guests can read from > > the register anyway and should only be able to affect their own state. > ... and create some architectural state that is impossible to manage > and migrate. Great. We can't already manage and migrate SPSR_EL2 (or SPSR_EL1 for that matter)? I might have missed part of how that's handled or used, especially given that I've not actively worked through this yet, but if we're not doing so then we've got other problems with for example PSTATE.BTYPE or PSTATE.SSBS. It looks like it's available and I'm not seeing any filtering of the values or anything. Note that ALLINT.ALLINT is similar to DAIF or SBSS, it's directly mirroring the state of PSTATE.ALLINT. The only access EL2 has to the EL1 state for ALLINT is via SPSR, on entry to EL2 ALLINT is reset as per the configuration in SCTLR_EL2.{SPINTMASK,NMI} and then the EL1 value is restored as part of exception return. > Frankly, we are accumulating a bunch of half implemented features > (SME, SPE) for which there is no KVM support, and I don't think this > is the correct direction of travel. Yeah, it's not great. For NMIs Lorenzo is looking at the GIC side, I'll let him clarify his schedule. Here it's more the case that implementing the architecture side without an interrupt controller isn't useful (and certainly not usefully testable) than anything else - my expectation is that it should work fine, though from your comments above it sounds like there will be issues with the handling of PSTATE that I've not realised. For SME you should start seeing at least preparatory bits very soon after the SME2 support lands, it's pretty much at the top of my list but it didn't seem great to have yet another large, interdependent series in flight at once so. I had initially been hoping to get the KVM support on the list in the gap between SME being merged and SME2 being public but what happened instead is that it took so long to get review of SME (with all the new ABI going on it's not 100% surprising it was slow but it was much slower than I expected) that it ran into the SME2 release. SME2 is only adding a single register of architectural state plus instructions so I'm hoping it will go a bit quicker but OTOH we're coming up to Christmas. This backlog is the main reason I'm reluctant to do any non-essential cleanups with the FP stuff at the minute - it just increases the number of things that could cause conflicts or dependency issues and those are likely to loose a release cycle. I'm not aware of the situation with SPE. --Qxpg+kLN1hqH5UmZ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmNryLwACgkQJNaLcl1U h9CB6AgAgmpdrRFxdY9S0dVui85DiHK0YbC6tJoSy5Rjt/phqY9pAszHi0sFx0mG mqX6jlKf7a1/9E2t1aPMxXePpQ8+WTK/8YuJcSq9hbBpybWITStPlNgd3aIi/zYT pclfhwzOU+f0wFAHvag/jQ4TexsRVfCF2W1j0T2r86eKKFrRmIaYWPHl7uDywHoZ 2fD+rj87MvHLvbSnw5iIZ1WO9OVVwPTjNKqGOAtmrh455SaOXND/3glE6eANR+np QmeSMVn4WWKIPhARUoyLrgIpws6kfseu8f+BQt630lfITAmhLlTTElyb9P/Mtb+m /L0xP1VFZoc512+8uYGklzmdn0hkoA== =LVub -----END PGP SIGNATURE----- --Qxpg+kLN1hqH5UmZ-- --===============7342952790727289361== 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 --===============7342952790727289361==--