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 D4F99C531CC for ; Thu, 19 Feb 2026 19:56: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:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=i7Tm6ncUdWgguxqkIOk3k7Al2LfontqYHvwjLYNhO3Q=; b=aDvk0xPpSE+vTqAhEPosm8Y1E/ qbMhCBxFEGXd76uXm/MjcwGn0sVQH+NlIxQIGnl4wKTw/Pb6JEk1K+PywqkdwVYA/kxl9NPXjLu2+ J05egHg/dHwJfTsmILWigZ0cBrm3Gm4H2u9e4ZvVmOrw1bZbHrXUDL5DiFKlxQ8qnbyxsNgFpJKk+ Jgt7hIC2vh/tHGhXzVmoS5LK7XOKmOCRoykKkGfQsW2TaZCXnZ/sy9NH3TxfjEk34ZlPVl4FUS/gX JgdTAugvHnRVY9LjasFS8hl+pu1m2spikCCIe1+48E6yIJDCOzCQsNULUYsMX9qwf8tdbG66r0owF 6vvkszFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vtA7w-0000000BtHV-3upy; Thu, 19 Feb 2026 19:55:56 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vtA7p-0000000BtD1-3dxR for linux-arm-kernel@lists.infradead.org; Thu, 19 Feb 2026 19:55:51 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id A29DF4455A; Thu, 19 Feb 2026 19:55:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80202C2BCB2; Thu, 19 Feb 2026 19:55:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771530948; bh=76pmomQArMSLAs0L9uu/C5/0Ws+wcuhfAoo5l+smieU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c5yaJDA16Ben7hnWrS2YYGKC0e0z2Y92GzaHDQRL+Xja3Nvy2RfceAIpILDz4mvUq 9KMVNAF1dAUN5Z7xfzcwKVZ/6HywXFbn55ZRCujYm3lMjbl7oV8tSLoYSWat1CUw7g D2+Sy6T0UlThiK26V+PDgRx0iw4Au5DCVUC1PnN2ijjb8vHFVXssFzxV1lY19Npo7t g/OHU0c/LgxBeY7eyQMOp9ygTTeR+kr22nTmrzReQGDnyOLR8oEjipFEEy9EfCQxIk Q1bEoYPlOFTJ03EcU84F+FODg3hOvJbnxvkyE8+y7A2mkfb7la956nxcRuNdipdTLN 4K+y1QG54MV6Q== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vtA7m-0000000CGHL-1oen; Thu, 19 Feb 2026 19:55:46 +0000 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev Cc: Fuad Tabba , Will Deacon , Catalin Marinas , Mark Rutland , Joey Gouly , Suzuki K Poulose , Oliver Upton , Zenghui Yu Subject: [PATCH 5/9] arm64: Convert CONFIG_ARM64_GCS to FTR_CONFIG() Date: Thu, 19 Feb 2026 19:55:28 +0000 Message-ID: <20260219195533.2455736-6-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260219195533.2455736-1-maz@kernel.org> References: <20260219195533.2455736-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, tabba@google.com, will@kernel.org, catalin.marinas@arm.com, mark.rutland@arm.com, joey.gouly@arm.com, suzuki.poulose@arm.com, oupton@kernel.org, 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-20260219_115549_955509_BC773C86 X-CRM114-Status: GOOD ( 13.35 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org While CONFIG_ARM64_GCS=n prevents userspace from using GCS, the sanitised ID registers still advertise the feature. Make it clear that nothing in the kernel should rely on this by marking the feature as hidden for all when CONFIG_ARM64_GCS=n. This is functionnaly equivalent to using arm64.nogcs on the kernel command-line. Signed-off-by: Marc Zyngier --- arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 3d7083280cdde..ca4aae48ace66 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -307,7 +307,7 @@ static const struct arm64_ftr_bits ftr_id_aa64pfr0[] = { static const struct arm64_ftr_bits ftr_id_aa64pfr1[] = { ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64PFR1_EL1_DF2_SHIFT, 4, 0), - ARM64_FTR_BITS(FTR_VISIBLE_IF_IS_ENABLED(CONFIG_ARM64_GCS), + ARM64_FTR_BITS(FTR_CONFIG(CONFIG_ARM64_GCS, VISIBLE, ALL_HIDDEN), FTR_STRICT, FTR_LOWER_SAFE, ID_AA64PFR1_EL1_GCS_SHIFT, 4, 0), S_ARM64_FTR_BITS(FTR_HIDDEN, FTR_STRICT, FTR_LOWER_SAFE, ID_AA64PFR1_EL1_MTE_frac_SHIFT, 4, 0), ARM64_FTR_BITS(FTR_CONFIG(CONFIG_ARM64_SME, VISIBLE, ALL_HIDDEN), -- 2.47.3