Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp121234lqz; Fri, 29 Mar 2024 10:24:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUU3MEkWeV3s3vdu1NpLMvmwxaBpNGs2hOsWK0qldc/apyyxa5NSPU1KD70DgTv+3PLhX6Ai8dpqaYvmJvpvzOaOChioSnQa08p1kbLZQ== X-Google-Smtp-Source: AGHT+IGhxgb7bjarcbwARwW2HqJ+dpo/aDUG4ZukZnusfq4sPqE+iqdkH7NLglT+hcIHKmluuRIh X-Received: by 2002:a05:6402:4311:b0:56c:197a:76e2 with SMTP id m17-20020a056402431100b0056c197a76e2mr2279749edc.0.1711733069217; Fri, 29 Mar 2024 10:24:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711733069; cv=pass; d=google.com; s=arc-20160816; b=B7ozTx2beA3r65t/3NfoJWLV8ZxMMJAJQKGP4+DCiIAPXi1Dh1Hh2rgKu5GvbC5z4Q VKvzUnjB+p7NEX2nCgzqbNYFo2KNpBrEvIn5aumJY17DF/ZABh2/TGbXEcBL8DhFtlFv pB2OvO9CchDwqIsScFaRix2ZsFLghYlYOuL+wJbty6Kh5UMcbb9CQbFrRMR8fhtdD/ed 1b2dnJixbeq6tF43TR0cq85QpIg8Yq2tW00VAHoWVfAo1f+FpWCk+xVXeCIP+7peaOnV RVp2yzbYIzXbc1Hkvlr+6d7QaE04V5Cgq2MiygHwX9BJ5PH7MLeo6C5lsC5PCgn4ovAg FfOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4nXAnictXeJV5AlqQSznerSrQYtHPHUJWwc4tHERygM=; fh=NxupQq4okJn/MdfS7ScPvfPSFgZQTPUJAwdV9L+gnCA=; b=Sv+hz3XfwDFJTsqp6UaZXwVg//Kgg2Yfi2szuESdJkpU/6TGFnLYQ4PUW8UQc7QZ0Y BMWLWYX4ipCkTS7HItfeViXZzEzd5NvUQMX9Lva1nD07+2LSp3XEDuNUxycDnLPT8dbs Lyg3peuUbb9cf5zlGYcbtM5ytRMSxPWqdQvuBpGCswSm+IERKB8TCffsNtPuAgz8myX6 RByv3vwoQGnqmtXPfs9lefQ1kHZujJ+7TQQsMBEhXisVUwvxJa8aKUzyjvKS1aKj4pZK F3j57c3OTazB6B0xT/WBOXKS3CkEFoKpsanhRV6ySBiQO9V4sAwU2Dztp6sNUE9+hYJ2 wLqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=PYhVXN1K; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-125236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r16-20020a50c010000000b0056bd7f3fcf3si1918921edb.624.2024.03.29.10.24.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 10:24:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=PYhVXN1K; arc=pass (i=1 spf=pass spfdomain=alien8.de dkim=pass dkdomain=alien8.de dmarc=pass fromdomain=alien8.de); spf=pass (google.com: domain of linux-kernel+bounces-125236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125236-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id EB3151F22107 for ; Fri, 29 Mar 2024 17:24:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 168D085644; Fri, 29 Mar 2024 17:24:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="PYhVXN1K" Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (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 090E42033E for ; Fri, 29 Mar 2024 17:24:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711733059; cv=none; b=InXjpwax40zuReg5ix8kBjo2TfRfrldKHk9RMWabKchr+wg5adMUG+uDVR6C229lepct+yWh1+hien59j6rkaIN67YZ5xO0SLdhlkl9BbjuWTPSXzWKrfqM8JRZ9zcG2ZJ7nVNtQ+POhslMKcEyowKTJKjbFyg2c+7epLfsQ6NY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711733059; c=relaxed/simple; bh=lkfPtEw77lSIZ0oGk/kE9oHshz0JUtvSGdjFFZ+c+io=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mxSsFvA4lCZt6LLEB1fsC3v7eI8qxTak8gIk5GidRT2Cx0MlJHkXLXHtCx0j9wwJC5257JHKOv1Z2pZlTiCaPS6ozJekBxz72N1JUnwR6vJOGPT+X67gxFyoKCR4ifA39Pzoko3DEMhiJDY2FnsXpvWiShezLTEnfrvq+sIqzpM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=PYhVXN1K; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 7282740E0247; Fri, 29 Mar 2024 17:24:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id WfnC5c0qMxFU; Fri, 29 Mar 2024 17:24:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1711733047; bh=4nXAnictXeJV5AlqQSznerSrQYtHPHUJWwc4tHERygM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PYhVXN1KOqeiylzpqs9e2StLyjBEDP+H6LD6oALxzJd905hduQp9B35wtAUqWMTEe qrT8sVMX/1QOgzNvOpN6ME+4K82VxN63TfudDjJR/2jua6hFaGRqMvWtFykckWw1jD QWr/5c6vBHTJhKs1Z7z3M3Gxijj1CkCZwlN9CQLjaHw02RCwrRkGjZBTpzyANKmzth 9pmSLX+NdHPnGv6ef0NlE1MRTFZRPCNsCa+UY+EMreXth6Y9mCyjSSOPK/KJsYgXIM +5hUq9bWo7O4SEcnytm7fz7s0FtkvCKvQ6FFN23Cj3tpIu1DyMzDqXmbnSlend2k8r mwelDysr6QVe7LmVmpTrBrIrQqInvlpmf4QitP/6kd34UiGL7rwRW2nSSRHFUkNf0X 0Z5/PoNpDlpi6jJq6oT1/0AryTAmR3+obNyXTCOBi7y3U2a+eEoGSy1N5MhtMVIzzh rWLg7Hyxb0IDJW8eUGAyIJlH08RmoNYwNDC+wz3EBO5I6GZRr5U5/288wEdud6Rb+7 jv9uKBhXh1i0klicpMOK+vYm9+BdgHLgXPizl1j6Bk05NzX+DmRslyyiq3qkFmKk0k 2H8JH4hdJhl3VNs9c/2LJ9FZNF235VvdwjreU7PLV3jcJkXXdUQUqnfaaFo5hWCS9z uHRLFxqJJXpM06gkQb+RdQtw= Received: from zn.tnic (p5de8ecf7.dip0.t-ipconnect.de [93.232.236.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 5E50140E00B2; Fri, 29 Mar 2024 17:24:04 +0000 (UTC) Date: Fri, 29 Mar 2024 18:23:57 +0100 From: Borislav Petkov To: Tony Luck Cc: "x86@kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 01/74] x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86 Message-ID: <20240329172357.GBZgb5LWSP2mPBFs7s@fat_crate.local> References: <20240328163746.243023-1-tony.luck@intel.com> <20240328163746.243023-2-tony.luck@intel.com> <20240328164811.GDZgWfSzAWZXO7dUky@fat_crate.local> <20240328165251.GEZgWgY1Clb9z4t3VX@fat_crate.local> <20240328171204.GGZgWk5JNOzQzoaEql@fat_crate.local> <20240329114007.GAZgaolwSFtjHStiuL@fat_crate.local> 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-Disposition: inline In-Reply-To: On Fri, Mar 29, 2024 at 09:46:25AM -0700, Tony Luck wrote: > I think you are talking about a range of models that all belong to > the same family (rather than steppings in the same model). Either. Depending on what you're tracking. If the majority of your feature tests want to determine whether you're running on the same set of hw features which belong to a model determined by a single or multiple model numbers, then you need to track that. On Intel you have a single model number determining that set of hw features. On AMD you have s range of model numbers and there can be differences too. Seldom we pay attention to steppings but it is not unheard of. We have had an incremented stepping denoting a hw bug fix in the past. > History of Intel model number allocations apparently looks like > we just throw a dart in the general area of a block of unused > model numbers :-) Don't say that. The guy who's assigning the numbers and keeps track of what he's given to which team, will be mad at you. :-P > I'm glad I don't have to keep track of groups of hex numbers like that. Depends on how you model it. Setting a X86_FEATURE_ZEN for each works like a charm. > My patch doesn't help with this, but doesn't prevent you from doing > a switch (c->x86_model). If that list of model number ranges shows > up more than twice you could add a helper that converts that list to > a #define AMD_ZEN2 to make the code clearer. Haven't needed such stunts yet and I hope I won't ever. > So keep the "V" in the common code. Maybe one of the other x86 > vendors will want to have #define names for their CPU models > some day. Right. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette