From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E658C2AD20; Tue, 24 Jun 2025 02:04:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750730702; cv=none; b=Kmu5oEvTwWo+iMpK2qA2poFozn7UDd1C3NnSU4YLNapkl5XoUAl+vl0u7YJeKNNVcKtnKiyagCY6a2xtrUjtJmP/domjg3w6GPZEkASYZxzMeKPxAHCjKmCaJ+S66ShEPD24S3nIEhAVJ+ceOjzWlYgiTeMy03h/ByQj2BaFX5s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750730702; c=relaxed/simple; bh=ozhNlPrG1zY3QnOQtbtSXT7lm+SrDzV7TAF7n5LDm5c=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=hv4109TC/oYAtfyGMbKerIykCtrmjnlRZhCBYhyiTlUxQPW573a9+hQgJrSWuHiRh4PawQzu5D9bLgGayw4LX7ek+0c7kHKyd3E1BNx96x/6X5XPvjVQcauezKrl+gWWetzEfNyR22FEKvVYRdIExLPPNEk0GytQyv2Teg16di8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=eBBb7hag; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="eBBb7hag" Received: from [127.0.0.1] (c-76-133-66-138.hsd1.ca.comcast.net [76.133.66.138]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 55O246qt1165702 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Mon, 23 Jun 2025 19:04:06 -0700 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 55O246qt1165702 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025062101; t=1750730648; bh=L3efv8sWvW3xYmKWauFJHtNCboQZu0NBi75OSGIZRQs=; h=Date:From:To:CC:Subject:In-Reply-To:References:From; b=eBBb7hagbmX719xPfYNmOmXwj6p75pGqZMYrqOrcUt7OdbZ/si3q8TUCP3nV5ZNGI 7zQ9dpCrNvDDvZg+1RoDsF5xFuAM0UHYlcWBNoKHQDxwLh8EwwPMLxfCAGabKtj6mc fhBcpg+bPg2hfzpCxgL5RPkxjcg61+8E1A7xR3oyHJ3lVuvuODrPXPUAn75ShbMTU7 zze2izK2c5CrWHSvOdPWT5pwFV6BFxVbxOQ+nssk7dR2Rper6L95RfcLCepdleCuih BkWAe3uL/jTMuHkGXyRJwKr1cK9PwcSCuGnPJeo9fLYR8WfM3eNPq89tdFqSdj2Mi1 IGSaayTzP7Tzw== Date: Mon, 23 Jun 2025 19:04:05 -0700 From: "H. Peter Anvin" To: Xin Li , "Kirill A. Shutemov" CC: Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Peter Zijlstra , Ard Biesheuvel , "Paul E. McKenney" , Josh Poimboeuf , Xiongwei Song , Xin Li , "Mike Rapoport (IBM)" , Brijesh Singh , Michael Roth , Tony Luck , Alexey Kardashevskiy , Alexander Shishkin , Jonathan Corbet , Sohil Mehta , Ingo Molnar , Pawan Gupta , Daniel Sneddon , Kai Huang , Sandipan Das , Breno Leitao , Rick Edgecombe , Alexei Starovoitov , Hou Tao , Juergen Gross , Vegard Nossum , Kees Cook , Eric Biggers , Jason Gunthorpe , "Masami Hiramatsu (Google)" , Andrew Morton , Luis Chamberlain , Yuntao Wang , Rasmus Villemoes , Christophe Leroy , Tejun Heo , Changbin Du , Huang Shijie , Geert Uytterhoeven , Namhyung Kim , Arnaldo Carvalho de Melo , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, linux-mm@kvack.org, Yian Chen Subject: Re: [PATCHv6 01/16] x86/cpu: Enumerate the LASS feature bits User-Agent: K-9 Mail for Android In-Reply-To: <73796800-819b-4433-b0ef-db852336d7a4@zytor.com> References: <20250620135325.3300848-1-kirill.shutemov@linux.intel.com> <20250620135325.3300848-2-kirill.shutemov@linux.intel.com> <73796800-819b-4433-b0ef-db852336d7a4@zytor.com> Message-ID: <0A71C898-B587-4292-AB05-6CA46BBD6F88@zytor.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On June 23, 2025 10:40:59 AM PDT, Xin Li wrote: >On 6/20/2025 5:50 PM, H=2E Peter Anvin wrote: >> On 2025-06-20 17:45, H=2E Peter Anvin wrote: >>>>=20 >>>> But I simply hate adding a disabled feature that depends on !X86_64; >>>> x86_64 has a broad scope, and new CPU features are often intentionall= y >>>> not enabled for 32-bit=2E >>>>=20 >>>> (X86_DISABLED_FEATURE_PCID is the only one before LASS) >>>=20 >>> More importantly, it is wrong=2E >>>=20 >>> The 32-bit build can depend on this feature not existing, therefore it= SHOULD be listed as a disabled feature=2E >>>=20 >>=20 >> Ok, that was word salad=2E What I meant was that the original patch is = correct, and we SHOULD have this as a disabled feature=2E > >Agreed! > >> The reason is that it reduces the need to explicitly test for 32/64 bit= s for features that don't exist on 32 bits=2E When they are flagged as disa= bled, they get filtered out *at compile time*=2E > >It's better to make it depend on X86_32 directly rather than !X86_64: > >config X86_DISABLED_FEATURE_LASS > def_bool y > depends on X86_32 > > >But the disabled feature list due to lack of 32-bit enabling will keep >growing until we remove 32-bit kernel code=2E > >Wondering should we bother enforcing cpuid_deps[] on 32-bit? > >IOW, turn off the feature when its dependency isn=E2=80=99t satisfied on = 32b-it; >don=E2=80=99t just throw a warning and hope for the best=2E > >Thanks! > Xin > We should have the dependencies enforced; in fact, preferably we would enf= orce them at build time as well=2E