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 68240F43841 for ; Thu, 16 Apr 2026 06:42:27 +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-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID: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=WBoqQFk0kGAZEELbWTBYVcv8C6wujAcOmZOUKJ4PXys=; b=4Hq+CikHLucHSnBVsmXZn/W1DH oaAsf34XXu4s1erL06I5mXvAptAMasRgpT+ZNNX/JVm06qW02uQF6ZiauFpNYFFN6h1/CD68YdAje nHvlaQFtE+OvSEu8iMeOPi+GeTtUVfSou+ITPdtIKgmzrfQmso7QqzkUSGOh7CaMkmkUP6HZwyfzl 4j8jDZZZz9Mol1d0D6hI0G0V4n1m0FG3S4sJ4+2RnAYk4lurByEZd5JJCDeK969J0RELavKV0n//s Ky6EXn66CnG1u0gFDOTm1yc+nkSagIT02lHCL4NcA7xhtb+D0LkE391Ntel1FfUEY5pdKhGWW0T62 vOp4lnNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1wDGQf-000000023yN-1oP1; Thu, 16 Apr 2026 06:42:21 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1wDGQc-000000023xu-2h5Q for linux-arm-kernel@lists.infradead.org; Thu, 16 Apr 2026 06:42:18 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id B7FC860123; Thu, 16 Apr 2026 06:42:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A545C2BCAF; Thu, 16 Apr 2026 06:42:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776321737; bh=11cXnqD9GuL+mka2cp1BbcZk3peWIaUxxgMncaij/+s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=PLKp00Zr5dadzQFoljLd6Cm9omkmkvx6d9k0rj403CsyzaqWMLTU04dYM8P8WLeHr 9D1jEbYpRjhevYoQ+GM3OmCYn0GHLOpZQ0u7XRh9qTT1Ltk+myc37kDDIpA9hFgJae SqC6TbNf3PMXrgGbGfNxAs9kMzfjvVko60yPvNa5C/cLm+yAJcUhizLRKIP3YqMl9G TVaNF+oJPo6E7IlSAdpOmzNgH5MmNp1GWNDFGxRPFSi0qxtfBPUQanaaHCABAJ/FiA vMtsIhEsuRf6aDOwBGvB2WZhkslxWgrXHLJUWm0jVE3ZLSpqJ7iuijdYqCN8m2bkci mnsKpVd0XI5gg== 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.98.2) (envelope-from ) id 1wDGQZ-0000000C3cH-0QHP; Thu, 16 Apr 2026 06:42:15 +0000 Date: Thu, 16 Apr 2026 07:42:14 +0100 Message-ID: <868qan2ypl.wl-maz@kernel.org> From: Marc Zyngier To: Mukesh Ojha Cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm64: cpufeature: Fix GCIE field ordering in ftr_id_aa64pfr2 In-Reply-To: <20260415200031.1885440-1-mukesh.ojha@oss.qualcomm.com> References: <20260415200031.1885440-1-mukesh.ojha@oss.qualcomm.com> 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/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: mukesh.ojha@oss.qualcomm.com, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false 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 On Wed, 15 Apr 2026 21:00:31 +0100, Mukesh Ojha wrote: > > The ftr_id_aa64pfr2[] array must be sorted in descending order of > shift value so that the overlap validation in init_cpu_features() > works correctly. The GCIE field (bits 15:12, shift=12) was placed > last in the array, after MTEFAR (bits 11:8, shift=8) and > MTESTOREONLY (bits 7:4, shift=4), causing a spurious warning at > boot: > > [ 0.000000] SYS_ID_AA64PFR2_EL1 has feature overlap at shift 12 > [ 0.000000] WARNING: arch/arm64/kernel/cpufeature.c:989 at init_cpu_features+0x144/0x3d0, CPU#0: > swapper/0 > .. > > [ 0.000000] pc : init_cpu_features+0x144/0x3d0 > [ 0.000000] lr : init_cpu_features+0x144/0x3d0 > [ 0.000000] sp : ffffc08678f03dc0 > > ... > 0.000000] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffffc08678f14000 > [ 0.000000] Call trace: > [ 0.000000] init_cpu_features+0x144/0x3d0 (P) > [ 0.000000] cpuinfo_store_boot_cpu+0x4c/0x5c > [ 0.000000] smp_prepare_boot_cpu+0x28/0x38 > [ 0.000000] start_kernel+0x1d4/0x848 > [ 0.000000] __primary_switched+0x88/0x90 > > This is because the overlap check computes (shift + width) > prev_shift, > i.e. (12 + 4) > 8, which triggers since GCIE occupies bits above MTEFAR > but was listed after it. > > Fix the ordering to match the register layout: FPMR(35:32), GCIE(15:12), > MTEFAR(11:8), MTESTOREONLY(7:4). > > Fixes: 899ff451fcee ("KVM: arm64: Advertise ID_AA64PFR2_EL1.GCIE") > Signed-off-by: Mukesh Ojha This was present in next-20260403, identified the following day, a fix proposed in [1], and the fixed commit appeared in next-20260407 (which was the subsequent -next build) as 7e629348df81b. May I humbly suggest that you check with the latest -next branch before spending time on this sort of things? Two weeks is a pretty long time... Thanks, M. [1] https://lore.kernel.org/all/874ilqcu3c.wl-maz@kernel.org/ -- Without deviation from the norm, progress is not possible.