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 B259FC4332F for ; Thu, 10 Nov 2022 11:55:06 +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=FGQJ9HKoN4qsYOH8wZ/j7WA3vkOYpf7kwBXbGkIEnkQ=; b=NtWQ65+hKsrMWtd8b1l6KtAJkz BvIC1B/vJR7gnparAnRrxUf9vk7YUNi/aUT8uKkMswFnhfJHz+OUucY2K7xTmzoXT9G/QxYNHPb/+ Xfo6s43TrK9M96KhEmD4DmPoPBFU4Ds6U7yfAwo8W2pCPOucv3ILGBnG5UgTtHuwPZdwraNtOykH0 P5EgQyGXyWTrcCbHQPaMyGWE+/JKsYjFlmRspCLkkSfWjlZqGT4IgneSL3Nl7TwHeXaluPM8eOSlW WYwJQrFMZKFg/3iJY0sZWqyjBpC3/ckePFEobX9I6p3FkplMOyCQFxu9VCpNF/+BplBhM8hlyKfMB YQ7ApFgA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ot688-005YFE-80; Thu, 10 Nov 2022 11:54:00 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ot62W-005VGE-HX for linux-arm-kernel@lists.infradead.org; Thu, 10 Nov 2022 11:48:14 +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 B80AA615B3; Thu, 10 Nov 2022 11:48:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED2B2C433D7; Thu, 10 Nov 2022 11:48:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668080891; bh=PUF3xQ4qCRHAcDbiM3MbMzx7kjA37NRGkNQk9yKS5aY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Axz2eQtoRY6tqjV4VduMR3uUDYDaWArpOfj9gopK0hvV0S9CsBq78OvZXSUZwg4sE F2vSaTDQeV+nrphs8HtgkthjdWdbRlGYWvo4WXT9+nvQW1jiSEtnCZKsiz3J6df28/ rgXaBQm+L0NmL5EE93+YEimDL5uIWMbmC7ZmRk92vz7H3mK9SIKh5fegf+b7z4FlNP 8sANXEt5uyI4j/hu/BWwREnimA5WGXUUOgKRlb2cLKvLSEGUq6acxqyhLbruGX1PLk IQt9BNaZs2A+nFh1tWKeuEUBZiu7zwR3oTUq8AemtfShpUJhk3nXutmiTBpTmwY7py gRPp9As+Con8Q== Date: Thu, 10 Nov 2022 11:48:05 +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> <87leojuse3.wl-maz@kernel.org> MIME-Version: 1.0 In-Reply-To: <87leojuse3.wl-maz@kernel.org> X-Cookie: Torque is cheap. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221110_034812_697383_19095821 X-CRM114-Status: GOOD ( 35.69 ) 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="===============2717205349693336213==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============2717205349693336213== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Pdr3LAUJ0jW9pkuD" Content-Disposition: inline --Pdr3LAUJ0jW9pkuD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 10, 2022 at 08:26:44AM +0000, Marc Zyngier wrote: > My gripe with the current approach is that it took us a *very* long > while to make pNMI work correctly in all cases (I'm pretty sure that > Mark Rutland still has nightmares about it). But now that we have the > framework for it and the mental model to match, I'd really want both > NMI methods to be merely two implementations of the same concept. > The only obvious difference should be that we can identify NMIs early > and that acking a NMI cannot result in acking an IRQ. I'd expect > everything else to be otherwise similar. OK, I can respin easily enough with that approach I think. We can try to reduce the locked regions incrementally I guess. My impression had been that the issues had been more around managing the GIC. > > 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. > Imagine you run a VM on some FEAT_NMI-enabled HW. The guest uses the > PSTATE.ALLINT bit because it can. Now we migrate the VM somewhere else > that doesn't have ALLINT, and the VM is dead. > This is a general problem with the architecture, but we definitely > should take care of it as we're enabling these features. Ah, I see - that's a relief. I wasn't super sympathetic to any guests that might try to enumerate the feature by checking for an UNDEF on the register rather than the ID registers, but yes that would allow such guests to run until migrated rather than dying immediately when they try to write to the register. I'd thought you were concerned about an issue for unmigrated VMs. > > 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. > The vgic support should be rather trivial. It is only a matter of > adding the required interrupt state, reworking the priority sorting > and LR stuffing, handling the additional MMIO range and dealing with > the GIC versioning. Trapping of ALLINT should be done at the same > time. > If people cannot be bothered, I'll end-up doing it myself. It'll get done, it's more a question of the split of work between myself and Lorenzo together with starting to push the review for the architecture side. --Pdr3LAUJ0jW9pkuD Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmNs5PQACgkQJNaLcl1U h9DU6Af+PVUkpULbHWZerYvm8NMN2Z6uDQbC8f4funQnH8yKigcSg4iVJ3bgEZBc 0Vb+vdDS/sNbjwasw7eDK13MNmBBWCdpNiU1vTVVK6+Zx9sRzKRZrrn+Baa1LYV+ oi3lGjww24OQrUAvLYWYDBiwJjBmhZQHnN7uWWmtAwVtJPwLMdV3xmP4N3Pm/RNX LzcDWiT+WswLe+pkz1nvv7rpa71sb67rvQwnQ/wZa4dkY5msPPQljmUb/qdcLkXP w9DIjhFkPEzMZVDIynPSMBfAAqhCgd0KitFjlHej6s1UnfdCDFf6eP5RGRHFyFNT s7HLnbiimmY+65a9aPGqDBXenjFhYg== =35cl -----END PGP SIGNATURE----- --Pdr3LAUJ0jW9pkuD-- --===============2717205349693336213== 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 --===============2717205349693336213==--