Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1601219rwe; Thu, 1 Sep 2022 23:57:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR6+vULuzc7OZao8SF2/mxz/9Lmp7RlDvTPto/rq4zZ/W5czMPG1KYAqf7rDkQD04o+5l32W X-Received: by 2002:a17:907:802:b0:73d:c710:943e with SMTP id wv2-20020a170907080200b0073dc710943emr25991549ejb.214.1662101860653; Thu, 01 Sep 2022 23:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662101860; cv=none; d=google.com; s=arc-20160816; b=eegg9YSLmUPgJXPaIAHuZJLFj3DSoPO1kt+clvxClfPX6t6IIX/hC77jqNem2YgCyW VYfvgJkMfd6pJqqDQoLmOT6N+gg7dpfCE6giY+jIhraOhJcnNPxnZK+jrlFtfzHITww+ RB1O61YKMYi7iG6f/ocWKH98YsCrXiWWvPkHcthI6ia3EX/T27nAbdK+1XVWIsgiqu6q v3bHZu78Q6IgBMOkhFSykpc5F5JCdB+1wbCkMQagu+1cc94s6EfSmbiIeyjSosh25IJd zYE5WwIVBN6qnKRKGVB8FAnMGxUF2F+v89dLb1MTDFh+x7bJxa8b14WNGejA9YVP5Tst Y4/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=/LU3di8KsXx6XUa2Nf3vVOJOBGN0ZW7PQ2Lfq5dneO8=; b=MlY8WBXb7GLTBjoIPyQZIaUYhfMlsY4/9cuScotZeS3C4b04wzexQNY2IgoN/RBgtb YoSqhW6WsdXYrCa1stC3yfDPkOgIEO+E1UB8u/ClYr6QiIL7vqxei0TiyLfb7dl9oYLu MX5Ue6zeCn82+cbBPx5OG4F96qVQIAcVBXlo7XhsyXEGTd8B4z2AL4Bto3Tw5kXF7O33 iP1Y/dR6sxB4D3877HjuenT4qfVDBu68lHTJiwzB06/EuoKb0MEdpLsPZR5glBAja1AJ FWwgzjYS3vYHJgEFncW2rourWAEVIzEKpyQntOaarHA8V+veTWXTs33wj7pzBdJbX+Av 9Zpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=QweYvVfF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id he12-20020a1709073d8c00b0073d8e16fd75si1311258ejc.567.2022.09.01.23.57.14; Thu, 01 Sep 2022 23:57:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=QweYvVfF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235217AbiIBFso (ORCPT + 99 others); Fri, 2 Sep 2022 01:48:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232913AbiIBFsc (ORCPT ); Fri, 2 Sep 2022 01:48:32 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87B21B7ECD; Thu, 1 Sep 2022 22:48:31 -0700 (PDT) Received: from nazgul.tnic (dynamic-089-204-154-243.89.204.154.pool.telefonica.de [89.204.154.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id CFC051EC0666; Fri, 2 Sep 2022 07:48:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1662097706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=/LU3di8KsXx6XUa2Nf3vVOJOBGN0ZW7PQ2Lfq5dneO8=; b=QweYvVfFE9i4n3wMR98UUdjyMdkKxjcgRZvoqNIX9fmLm0qp14E36M+FjfMRBW7lI+jslO pxs/x8MMOiD3TeEuBDEVcMLijLo+RAJwOCzuyZwvK51JrI9cRCalLAfIeKaV+9ChxuV4bu lay5NDvgz0lf2ZNv0ehx2WveB1c0kIQ= Date: Fri, 2 Sep 2022 07:48:31 +0200 From: Borislav Petkov To: "H. Peter Anvin" Cc: Jim Mattson , Thomas Gleixner , Ingo Molnar , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Sean Christopherson , Paolo Bonzini , Peter Zijlstra , Josh Poimboeuf , Pawan Gupta , Babu Moger , "Chang S. Bae" , Wyes Karny , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "open list:KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86)" Subject: Re: [PATCH v3 1/2] x86/cpufeatures: Add macros for Intel's new fast rep string features Message-ID: References: <20220901211811.2883855-1-jmattson@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 01, 2022 at 09:14:24PM -0700, H. Peter Anvin wrote: > Any reason why these bits are hidden from /proc/cpuinfo? Yes, we aim to hide such purely CPUID bits from /proc/cpuinfo because it becomes a dumping ground for "enablement" of new features. But 1. those features are not really used - most userspace like binutils and gcc, etc do their own detection. (Yes, yes, I'd like to have ubiquitous CPUID faulting). 2. /proc/cpuinfo is an ABI so we have to carry *all* those gazillion flags for no good reason So we have tools/arch/x86/kcpuid/ which we control and we can extend with all the CPUID querying needs we have. These kvm enablement things are kinda needed because guest userspace gets an emulated CPUID so in order to detect features on its own, it needs them. And kvm has tied features to x86's X86_FEATURE stuff and there are sometimes weird interactions with it too but that's another topic... Oh and we still do add visible flags to /proc/cpuinfo but only when they're features which need and have received non-trivial kernel enablement like TDX or SNP or so. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette