Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp551525rwe; Fri, 14 Apr 2023 06:50:13 -0700 (PDT) X-Google-Smtp-Source: AKy350YqC4NmoeZdgIpmDHjIzYWDMTcrjyYaZutDbqaJ8msTQ9ck7P8IDsWA35PlovsTeMdY3h2q X-Received: by 2002:a17:903:2289:b0:19d:ee88:b4d7 with SMTP id b9-20020a170903228900b0019dee88b4d7mr3691612plh.25.1681480213308; Fri, 14 Apr 2023 06:50:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681480213; cv=none; d=google.com; s=arc-20160816; b=zPmKahtnsNqMsGH08ZcLvvadQcddfvXCEzpSayoFljnbvcy18Xi/SeB5iNSTvh8S1p yTxeWXE6nzi1HACTBFKBto7ZXLDFEdxgBL6Q6u5jEE88MX8AOuoRyPZDw9PkIcGpSlJ3 DbTrTxGiPCZhvwIdBUX7S5Ffvi07zLUfEhROaSfpIyWVcpce+RvBOuiNJ9JhSqbPtJyj b9Tmp8ErAMqBEvBe0Ka00WFaCakB/qcebI8sC+N2/PPWjYKZuBIksVSMHoMpMT4GjYwe KLOMhy+pSkeu6LuBoo9253AhZ4imdi4CSDPw4Xhix7ffxMHkHYJ1AHdNMAhx2tbF5eXg EmWQ== 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=Sblj0wVPJVRQ23wXdNXTYFU86hWrZ9q3dMtSwDNtMsw=; b=q1MKJkd23PiTPP2gbBsrP4byAd6qbTuGBzNvTf7n2quMOb/DlIniwfq+b94oHyLfua MLHo2kkkl4nucwv+bY6ys+5WysurozTAw2cS/+W5NqI4FLvAl07GuP2uLl6eJLdaXcrB hQMvj6S8ykEN0ceeCAnbmTnfRKeFzFzfNM6wbwSyADAjqewZ7T9NFQQJ3v1qSveCaEpC rSr+4b7HgUAPN3RApAjhOoM/bHzzBf6SycOgXZepsF2rubaHloxn0OJznJA47iXXLr5l mgjIyLA+LF/Hww7qeIbyBmdEVAECAVtcTBoV849pEBPEJtXascY2ALKEcYpJooMMLBc6 DK/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=igDne3ue; 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 iz9-20020a170902ef8900b001a51c3404e0si4623227plb.337.2023.04.14.06.49.58; Fri, 14 Apr 2023 06:50:13 -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=igDne3ue; 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 S229762AbjDNNsc (ORCPT + 99 others); Fri, 14 Apr 2023 09:48:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229625AbjDNNsb (ORCPT ); Fri, 14 Apr 2023 09:48:31 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C0D3E4 for ; Fri, 14 Apr 2023 06:48:30 -0700 (PDT) Received: from zn.tnic (p5de8e687.dip0.t-ipconnect.de [93.232.230.135]) (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 CF7961EC06BA; Fri, 14 Apr 2023 15:48:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1681480108; 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=Sblj0wVPJVRQ23wXdNXTYFU86hWrZ9q3dMtSwDNtMsw=; b=igDne3ueaDCtgYF1+edWobaeL21l4Kk0tJvECQ2n0xJnLApnWtmSluHI2/csM7z2SoaiiT 9uPOA0pbz6iL7Th5203sxDw77FnqaWRECkespTFgSMyeuhLCSb+dFh8zScDQAYJVvlERcK hw0s0oXq89aTyB90KcFGt1rGDMGmx/I= Date: Fri, 14 Apr 2023 15:48:24 +0200 From: Borislav Petkov To: Tony W Wang-oc Cc: tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, seanjc@google.com, pbonzini@redhat.com, kim.phillips@amd.com, babu.moger@amd.com, pawan.kumar.gupta@linux.intel.com, sandipan.das@amd.com, CobeChen@zhaoxin.com, TimGuo@zhaoxin.com, LeoLiu-oc@zhaoxin.com Subject: Re: [PATCH] x86/cpufeatures: extend CPUID leaf 0xc0000001 support for Zhaoxin Message-ID: <20230414134824.GCZDlZqDWLl6A958SF@fat_crate.local> References: <20230414095334.8743-1-TonyWWang-oc@zhaoxin.com> <20230414104808.GBZDkvaJechZSM+SI9@fat_crate.local> <7866e99a-df88-14fa-92ae-c5b5d176724b@zhaoxin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <7866e99a-df88-14fa-92ae-c5b5d176724b@zhaoxin.com> 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 Fri, Apr 14, 2023 at 09:14:17PM +0800, Tony W Wang-oc wrote: > The instructions about these flags can be executed at any privilege > level. I think using these flags in kernel mode is a case. This patch > shows the statement of these flags to the user mode explicitly. So users > can see and use these CPU features conveniently. > > > If you want to dump them on the hardware to know what's set or not, > > there's tools/arch/x86/kcpuid/ for that. See this here. We have this tool exactly for users who wanna see CPU features. All CPU features, as a matter of fact. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette