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 2CA3AC197A0 for ; Fri, 17 Nov 2023 12:22:02 +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=bCFTZUlSlNEFSSQHPRbbyrsw/NsWNgmOBJDO16Ch+LY=; b=xlJe2HSai3Mv/i RSnZnxkAZCgxCm+NTtXzZrmJ1g4Hkg/WkHhrDTyraaX4SaEsrMpdmkrtZkUFfpj+srTnyb/CwjOch 7zw0qMIDzTgV7mpLasmYzZf3ZvgR9gPNJ9N4rw91UPq1Gl7RaP/5GfEvOtvvjsQPKwEsyLNjS9Rjp qznI5lAOMVQFlLlYJXo7ZsBZj7VIt4ke+JDbAOnSDe+nFx4hRrwjwFIQxsBfpD4EMLAC7Vz8tF+uF 7RtH/vE2OJiJNszwIoRlio98ujHN80DapD3qqHvl5VaarVvmNAruIV7F7d3ey4Tk6GNbSUscLH4PA 5jqfAIU/iUKPJOBsq4qw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3xqs-006XMb-1U; Fri, 17 Nov 2023 12:21:38 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3xqp-006XM6-0H for linux-arm-kernel@lists.infradead.org; Fri, 17 Nov 2023 12:21:36 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 62D7B61C40; Fri, 17 Nov 2023 12:21:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 751EBC433C8; Fri, 17 Nov 2023 12:21:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700223693; bh=vdKAQdF37yxRhL8faPUHglEp2Q5802XUFyQK39UMUBo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=RCLrFHBRu0yk80FkGmanwZXv+N151ua+8RfPwi1Dr/a+lR4ZSqTysS5C3cJmBD2so FvT4rkGoC8tuJgBngDguYl7jG/Ia0ORtM9eXNFFj26Z492JvILAASTK/c6Pq/YjQgJ sD3OVlpZXKZLpQudBLOrK2F4B5ebiOBrF0JLFjnxccHm3uC7oXmKY8jsNZgj0FibBS QUd09lgiUBr6d/+ch32I/Ormp7bnhDPK2opWrtOM2nmLEU7+c91cJ3/aabqat4BKfP LMqJiSSr2AcjNeH6tql5Z/Lz1eTkhXrU6CZrzWKJvnQJlrlW87AVo+Azun6mKZdjUl ZiRyJ99aIvDfw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.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 1r3xqk-00DyIE-S9; Fri, 17 Nov 2023 12:21:30 +0000 Date: Fri, 17 Nov 2023 12:21:30 +0000 Message-ID: <86v8a0zi2d.wl-maz@kernel.org> From: Marc Zyngier To: Oliver Upton Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, Catalin Marinas , Will Deacon , Mark Rutland , James Morse , Suzuki K Poulose , Zenghui Yu Subject: Re: [PATCH 05/12] arm64: cpufeature: Detect E2H0 not being implemented In-Reply-To: References: <20231113174244.3026520-1-maz@kernel.org> <20231113174244.3026520-6-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/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: oliver.upton@linux.dev, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com 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-20231117_042135_237226_90FA65F6 X-CRM114-Status: GOOD ( 24.15 ) 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 Fri, 17 Nov 2023 00:56:36 +0000, Oliver Upton wrote: > > On Mon, Nov 13, 2023 at 05:42:37PM +0000, Marc Zyngier wrote: > > FEAT_E2H0 is a new feature that indicates whether or not HCR_EL2.E2H > > can be set to 0. Amusingly, this feature is set to 0 when implemented, > > and otherwise negative. > > > > Add a new capability and detection infrastructure to detect the > > absence of FEAT_E2H0. > > > > Signed-off-by: Marc Zyngier > > Reviewed-by: Oliver Upton > > > --- > > arch/arm64/kernel/cpufeature.c | 7 +++++++ > > arch/arm64/tools/cpucaps | 1 + > > 2 files changed, 8 insertions(+) > > > > diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c > > index 41db7f993eef..e0d64e8b4851 100644 > > --- a/arch/arm64/kernel/cpufeature.c > > +++ b/arch/arm64/kernel/cpufeature.c > > @@ -2787,6 +2787,13 @@ static const struct arm64_cpu_capabilities arm64_features[] = { > > .matches = has_cpuid_feature, > > ARM64_CPUID_FIELDS(ID_AA64MMFR2_EL1, EVT, IMP) > > }, > > + { > > + .desc = "FEAT_E2H0 not implemented", > > + .capability = ARM64_HCR_E2H_RES1, > > I did read this a couple times before the neurons that interpret "0 not > implemented" and "RES1" fired together, heh. Yeah, the whole thing is upside down, in order to preserve backward compatibility. I guess that as the architecture deprecates old cruft, we may see more of this sort of constructs. 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