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 6A15EC352A1 for ; Wed, 7 Dec 2022 19:09:35 +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: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=JopjcJgXmnR9jDvCyONaCWTxWTmom62ESOgihGfXo5c=; b=rafkoh5Fd/Bq+X WdqtKHXkpgw/wJqnPof3zL7g0v7q9mpArC5ei+I7heT7IztYi0JkErMc8uqHi/PDi0kx0whY9Hu/A cwEz5BeNsHy/lcJb0BmG8ziKersrMq1GM3AKYvUJtvJeD3aygvO8fb29BntgCvfhC7uXq0JUZP8xb qtBMYYryExSUCPY+x8+JJb8x5bXGEplDavHUYsTnAj1g09sBXctzNxxsThjbsSkNUZuFLs4aLio97 0l/WJV5RhfbNhQXMQrvG0TDWgS88vaShcjToj2XqvgNI+tOqPXTbnHJeX0RcOLJvKf1LqfCNv3PKQ tUY9kaTuWNcyRbRROasQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p2zmK-00ALP4-RS; Wed, 07 Dec 2022 19:08:24 +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 1p2zmH-00ALJo-Q5 for linux-arm-kernel@lists.infradead.org; Wed, 07 Dec 2022 19:08:23 +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 7DB2DB81FDC; Wed, 7 Dec 2022 19:08:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41867C433D6; Wed, 7 Dec 2022 19:08:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670440099; bh=0aNQSt/Rs696O0VdRZE0xs2TdN0DxoQfX2sMQdkHzrg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sB4ph/pADStzaQfBDYbHTwuOQRYHmaaPjbbmgDCbd/6np8GSJcEApDFgY7m8WLgpp zEJa08lRISChER2w7K33ikyZ+0Le0VmOGzVCFb3EegnjeDJOa9HlDTp53DgA2R8bsG xI/O3V//Diwt98mPaF5gSlGOFC6to6ddhfOaYEIF9/fEq4eBgwQW5ZQiTTn8aTP6x+ V/XqH80eoaRbBz2tbt1+ABZMdjW5kfhERAe02zQUxdb8zAttevarcid/3Puwuw40zZ drpKk31piBK33ytishcnfen0qvol6fVHw0pxhw7y6cjaQoyuRMXI0YSTutkqEPoDzJ lD8KCQVSCPReA== Received: from ip-185-104-136-29.ptr.icomera.net ([185.104.136.29] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1p2zmC-00BBkH-Md; Wed, 07 Dec 2022 19:08:17 +0000 Date: Wed, 07 Dec 2022 19:06:36 +0000 Message-ID: <87wn73rq2r.wl-maz@kernel.org> From: Marc Zyngier To: Mark Brown , Suzuki K Poulose Cc: Catalin Marinas , Will Deacon , Lorenzo Pieralisi , Mark Rutland , Sami Mujawar , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Subject: Re: [PATCH v2 08/14] arm64/cpufeature: Detect PE support for FEAT_NMI In-Reply-To: References: <20221112151708.175147-1-broonie@kernel.org> <20221112151708.175147-9-broonie@kernel.org> <86r0xdlodg.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.104.136.29 X-SA-Exim-Rcpt-To: broonie@kernel.org, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, lpieralisi@kernel.org, mark.rutland@arm.com, Sami.Mujawar@arm.com, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221207_110822_151272_82A9529E X-CRM114-Status: GOOD ( 30.74 ) 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 Mon, 05 Dec 2022 19:32:01 +0000, Mark Brown wrote: > > On Mon, Dec 05, 2022 at 06:03:07PM +0000, Marc Zyngier wrote: > > Mark Brown wrote: > > > > +#ifdef CONFIG_ARM64_NMI > > > + { > > > + .desc = "Non-maskable Interrupts", > > > + .capability = ARM64_HAS_NMI, > > > + .type = ARM64_CPUCAP_BOOT_CPU_FEATURE, > > > PSEUDO_NMI uses ARM64_CPUCAP_STRICT_BOOT_CPU_FEATURE. What is the > > rational for using a different policy here? > > I couldn't identify any issues that the kernel would have if the feature > was present in the hardware but unused so I didn't see the need to be > additionally restrictive. TBH I'm not 100% clear why the _STRICT is > there for pseudo NMIs, it seemed a bit out of scope for this series to > try to clean that up though. Suzuki is your man for this, adding him to the party. > > > The whole thing is way too restrictive: KVM definitely needs to know > > that the feature exists, even if there is no use for it in the host > > kernel. There is no reason why guests shouldn't be able to use this > > even if the host doesn't care about it. > > > Which means you need two properties: one that advertises the > > availability of the feature, and one that makes use of it in the > > kernel. > > To be clear I think what you're looking for here is a capability that > omits the cross-check with pseudo NMIs rather than something that's > strictly checking the hardware (so ID register overrides will still > apply)? I've done that locally, my tree currently has capabilites > HAS_NMI and USES_NMI. Something like that, yes. And HAS_NMI should be unconditionally enabled (command-line overrides notwithstanding). Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel