From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.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 0049B3BC4F8 for ; Tue, 20 Jan 2026 08:28:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768897682; cv=none; b=ROd7VW+alkNudIiL0U1KLD1TNMGPzsWJxOJe7y1lWNBkEYo6fpwYUwsMgon3BMAsXiKbQ1TNOsAaATZo71ZDjRinwI3bA6O3Vc+cZTfV4oK2Wy45N34rM/7y2jcbfytPr0BC7lRuKceif1DM2rO5h2hUZNMnaW2nMUZlz9Vxjxw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768897682; c=relaxed/simple; bh=Y+XOgO2fJ+Lj2/LIyWh/dkNq23eoGVds1Q6ovMF2iYI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nmxKIhCb0MyLfE+ABO5VfAObQ+4KIZUgO7CZOuM0Ihks2keMdgOejkzM1PPgU4BddH05++jJCuki0Lv33JHuavs4pd+vCT+icy1ZVrCASqzvwe7F63BWFFxpqRb9Y6IhgXfjXI0Iq5V5hlzGIDYRFFdEmRkkuq90fc3VwLUclEI= 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=GIdmhaCy; arc=none smtp.client-ip=192.198.163.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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GIdmhaCy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1768897681; x=1800433681; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Y+XOgO2fJ+Lj2/LIyWh/dkNq23eoGVds1Q6ovMF2iYI=; b=GIdmhaCyg1oAdxCAyjz3uqarzV1ow+YoVadg/TeR95ZnmG+UxSRuQyCi vjMY5oKJBGhd5t5VOzNrUxdZd2Tuid1ccvENXR8zdjWXcHl2hUQgxfdeW hP2gxBQWUcRrQLeBKE1YJSH4IGh7GEOYwFPGqm8Y0suJrbn2UWNMq65YR bo50kuMP1jg7Q8bqAwWm2sF31Ykxh+9+cTRI7sBNhANx3qSX1bOS5EJeX PL0HLbclfsDoAKtQFsng1/h5OoGwbrnVcheINbjXA61ORUJrdpzZPPkxw e0CF1I2rAKihfFerPeUgpQuSLEdVPw1kb0PtQdideSK0320DOP/3KLaDj w==; X-CSE-ConnectionGUID: pZ3DecZoSH6C9DML5nJ6SA== X-CSE-MsgGUID: YK7t8ck7TbaceYkjQFmH5w== X-IronPort-AV: E=McAfee;i="6800,10657,11676"; a="72687174" X-IronPort-AV: E=Sophos;i="6.21,240,1763452800"; d="scan'208";a="72687174" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2026 00:28:00 -0800 X-CSE-ConnectionGUID: TcNcDk+bSiOgRIyD3VaJIg== X-CSE-MsgGUID: ECaG68IhT3SRxz0EGOjhxA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,240,1763452800"; d="scan'208";a="228987732" Received: from black.igk.intel.com ([10.91.253.5]) by fmviesa002.fm.intel.com with ESMTP; 20 Jan 2026 00:27:57 -0800 Received: by black.igk.intel.com (Postfix, from userid 1003) id 6230E98; Tue, 20 Jan 2026 09:27:56 +0100 (CET) Date: Tue, 20 Jan 2026 09:27:56 +0100 From: Andy Shevchenko To: Dave Hansen Cc: linux-kernel@vger.kernel.org, sohil.mehta@intel.com, Borislav Petkov , "H. Peter Anvin" , Ingo Molnar , Jon Kohler , Pawan Gupta , "Peter Zijlstra (Intel)" , Thomas Gleixner , Tony Luck , x86@kernel.org Subject: Re: [PATCH 4/6] x86/cpu: Add platform ID to CPU info structure Message-ID: References: <20260119195047.86E3C696@davehans-spike.ostc.intel.com> <20260119195055.0B00B57E@davehans-spike.ostc.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: <20260119195055.0B00B57E@davehans-spike.ostc.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Mon, Jan 19, 2026 at 11:50:55AM -0800, Dave Hansen wrote: > > The end goal here is to be able to do x86_match_cpu() and match on a > specific platform ID. While it would be possible to stash this ID > off somewhere or read it dynamically, that approaches would not be > consistent with the other fields which can be matched. > > Read the platform ID and store it in cpuinfo_x86->x86_platform_id. > > There are lots of sites to set this new field. Place it near > the place c->microcode is established since the platform ID is > so closely intertwined with microcode updates. > > Note: This should not grow the size of 'struct cpuinfo_x86' in > practice since the u8 fits next to another u8 in the structure. Have you run `pahole` to confirm? ... > c->x86_cache_size = 0; > c->x86_vendor = X86_VENDOR_UNKNOWN; > - c->x86_model = c->x86_stepping = 0; /* So far unknown... */ Shan't we preserve the comment? /* So far model, stepping, and platform_id are unknown... */ > + c->x86_model = 0; > + c->x86_stepping = 0; > + c->x86_platform_id = 0; > c->x86_vendor_id[0] = '\0'; /* Unset */ > c->x86_model_id[0] = '\0'; /* Unset */ -- With Best Regards, Andy Shevchenko