Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1613034lqz; Mon, 1 Apr 2024 11:24:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUZ7ML09f2YROtZ1/psI7YqBojyeL/bRovqQsfLTCZNDhU9tjaa9YLFTaaAAM8ul7wcLjJDxQH/Pfm22JtLCVn+DHGJ+4GEJqJkZro60w== X-Google-Smtp-Source: AGHT+IEC5+lmDJYGPBTC7i4AxO7rp2ReYRQglyHVzTcuyRv7k2A6MA5tdR0Wmy9y2yJktZ+n1Oir X-Received: by 2002:a17:902:e5d0:b0:1e2:23d2:a855 with SMTP id u16-20020a170902e5d000b001e223d2a855mr11593850plf.28.1711995864525; Mon, 01 Apr 2024 11:24:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711995864; cv=pass; d=google.com; s=arc-20160816; b=uKO/kUABeqJpGYXW+AGAHH15wV/VG97HI6bxwSxckJ9qa9od03cqy97m3/rz3fxDLs WpjR33LZTf14LtR6BK8uUwjecADtccoc1JOFCS3UyVXxHKRjY68dojbkKxmZJrGqQLVE HUTT7u+jrWTWpSiQ7Awf9ztfSGFOz6hWHycd7yasTOyOpQsbJ8rtzqYeBX3ox/eWOEWS vdATwfwPoOvDBsk3FePlN6oZ2sfT3mwLwt9ZApz6VsKdvUWjVOYOkPInZR6FIHUFq+FY bYrH/v4kknBPhQCrHDtMa5LFJ1ixDsSoOb/RIfsT+0IBaL/sV7Y4gLQy5gzix/4KQUWN 7zgg== 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=c3Zc5t+ZkD4iav4L/oZJ6sxrj+zmzbIJKMCkxGfCNT4=; fh=zw8j/EgCMDBYih2muUv8cj+58iwaCsGr/vLAJnUP+KU=; b=tichxQamItlGiKT7x+7WGdvTgoRJ+Ace76zTMygpZQqxVWIX8RL6ziKxJVeqFYSn2q 2+oS89arvNO2qVM2rJxl+uhZI85WbW3W+kLHtKrUg82mqc5V1IJLYo79MF68umokdoTP jC8uayo9qnBPOi16lzbHixZgkMbRG/qwXzcIsJIaZbH5WII8W5stQTxsIbWc+K9s514a a2lSGen15k22Hw3Os+1qX+JkZ1cLhdr8A7b9y5ru0Qo/ExSfC0bEyR36mUxI3p56MxGB 2iBv/zy9bLObZSlc5j0wd92Pvoiw3/bnlJBSjN4Z6ZLwylhY069uayZibDdbr+NeKzj/ YT7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gXGhCOdG; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-126945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p23-20020a1709027ed700b001e035bf0f00si9238486plb.513.2024.04.01.11.24.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 11:24:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=gXGhCOdG; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-126945-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126945-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D7F56B21B20 for ; Mon, 1 Apr 2024 18:24:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45A784F60D; Mon, 1 Apr 2024 18:24:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gXGhCOdG" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 C2F0F4F1E5 for ; Mon, 1 Apr 2024 18:23:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711995840; cv=none; b=QMoL1n2ByvE9PJ/FYSTalwAruWJ0zOscFGhlT7UGQGj5AdKQqGr65nI2JNJ+qV0Y5sVvuHo5Xgh+rRuSV01el/DehcdAhQaGF1DV+XpoZ/ACHWLuaZZ39n8ebdcgNu9yBojsJj5Ya4YYp3z2JlplvO5pseOtwcl1nU8AmfroeNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711995840; c=relaxed/simple; bh=levUNnPr8AlP3VGmUxIs5WxgRAF0SDf2QhTaPnCNFNM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JxH+PtUorKOjCNJlJo0iE9Hvk6wLIFI6mWBhBrLF1tcuQr6OpRo3XFKa/rtgxxDPYqhD0axd55e0Bh+AnRrkM30V1gREvUNxxYfi90nDJrU8PJIVSFrpZJuEOssxnViOWWe7bR+1RbbTXmwWB87yIr1AIwIGEtr4QcQJJMGh834= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gXGhCOdG; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711995839; x=1743531839; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=levUNnPr8AlP3VGmUxIs5WxgRAF0SDf2QhTaPnCNFNM=; b=gXGhCOdGxGzkh8B8F1eymADlsIOHvwKviKmpYFCi2c71xWA2hKX6gRpP V8cgi9VJzzEfMqmod8Eg/Ca/ApG+GSzkgxG2hqAdC46oKWN+KYBhsL9tU J49TwN2Lk1Rcabk1y0qO1SnuBkl2pvX1LM6ureg3a1LV/XRprJm8rayba LvG+gQvLGlhjIqDriqHEOs6EAgD8E6NMz2SsSRDQu9izti6jLyhp9KUGs eESWYDCFWNaxPH/7f2aNK0B2U6BRbIWsfsiASbnb3d8+lJ/SZXA5iUvJu ORFzwig5kwRw5KHMUWwVQHMBgJtMx3i2HJavl0p8KlOHB++kQntDRmUXg g==; X-CSE-ConnectionGUID: JNedZfnQTaCQw8vkB6s8pA== X-CSE-MsgGUID: kKXmZlKPTBqu+22ZXj1O2A== X-IronPort-AV: E=McAfee;i="6600,9927,11031"; a="18287123" X-IronPort-AV: E=Sophos;i="6.07,172,1708416000"; d="scan'208";a="18287123" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2024 11:23:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,172,1708416000"; d="scan'208";a="17615392" Received: from agluck-desk3.sc.intel.com (HELO agluck-desk3) ([172.25.222.105]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Apr 2024 11:23:58 -0700 Date: Mon, 1 Apr 2024 11:23:57 -0700 From: Tony Luck To: x86@kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2 01/74] x86/cpu/vfm: Add/initialize x86_vfm field to struct cpuinfo_x86 Message-ID: References: <20240328163746.243023-1-tony.luck@intel.com> <20240328163746.243023-2-tony.luck@intel.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=us-ascii Content-Disposition: inline In-Reply-To: <20240328163746.243023-2-tony.luck@intel.com> Refactor struct cpuinfo_x86 so that the vendor, family, and model fields are overlayed in a union with a 32-bit field that combines all three (together with a one byte reserved field in the upper byte). This will make it easy, cheap, and reliable to check all three values at once. Signed-off-by: Tony Luck --- arch/x86/include/asm/processor.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 811548f131f4..4c5d166aa473 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -108,9 +108,15 @@ struct cpuinfo_topology { }; struct cpuinfo_x86 { - __u8 x86; /* CPU family */ - __u8 x86_vendor; /* CPU vendor */ - __u8 x86_model; + union { + struct { + __u8 x86_model; + __u8 x86; /* CPU family */ + __u8 x86_vendor; /* CPU vendor */ + __u8 x86_reserved; + }; + __u32 x86_vfm; /* combined vendor, family, model */ + }; __u8 x86_stepping; #ifdef CONFIG_X86_64 /* Number of 4K pages in DTLB/ITLB combined(in pages): */ -- 2.44.0