From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (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 5A1D33CF699 for ; Wed, 4 Mar 2026 18:10:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772647819; cv=none; b=tiyfu8JTRnjSRXkcPvzloYDVm/XcaJ//Mk8dLhpbrP7FvWG2dwbu7ltR5kbc0dzak4GlDqwIpPRK430dcFccZsUDW1bJd7sx+Wn/Ts6D3hciiHeYKtgfuVuRbOKf36d+90LTQZKsQA4QuyUj403XGwHkDdQiBn4WverCHkcvRxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772647819; c=relaxed/simple; bh=Pg5NCYOkVX5/twwwyiPiVsRhzL9vEoz9ztKEfnchYiQ=; h=Subject:To:Cc:From:Date:Message-Id; b=UCAAedsqTXATVpMOq8R886vY8TWAYVbYlMioqBdR4/n++EqOxh8b0mJd17Z+4yHGvU/cSZDZzzBgc/tUOW2uOlLJYeyuFfNccXbIwtFkCBHyE9bGC4wuuY0D9OJRZijz/+O3r9V5hw/qENO+Munv3iGDUakWFNpON+1ebV6E1pw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=ZT4wmNK/; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ZT4wmNK/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1772647818; x=1804183818; h=subject:to:cc:from:date:message-id; bh=Pg5NCYOkVX5/twwwyiPiVsRhzL9vEoz9ztKEfnchYiQ=; b=ZT4wmNK/jGHxJM67I+0LJfMqUb5Fnmcm5MVqJV4QJoYzGTa2PnrLC/Kr ffbdPfLBCQOLDYtyC5omJ33+Pl0d5tf2S2D6NcrZaqyPBO4QmDAcJnYMl VHQ65YKKkhwr/mW8BnWAwhGCfrgejydmd/8ATdyIidkYNB2Dfr4UKe3CK irN9xJBxfK7DN9yxRsm1UZD2JdCDc/G6/k4kDYOEk08iyb9NEEvdWPgNj gA3yhMYiYmHZYNM4rHPbHqRCOeVslDFaldaYP3L4WL4m9fw+5kJEo64Ng u90409YpNPv+lhOYhDFfSTJDggRTx+NJL2vv0ZkYT3mN8pJM45tGiOA16 g==; X-CSE-ConnectionGUID: O25LnK49Tiy3WilegxGU/Q== X-CSE-MsgGUID: ceSl8lnySxqr5IwiQCjERQ== X-IronPort-AV: E=McAfee;i="6800,10657,11719"; a="61291086" X-IronPort-AV: E=Sophos;i="6.21,324,1763452800"; d="scan'208";a="61291086" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2026 10:10:17 -0800 X-CSE-ConnectionGUID: rxwvtufQQbqyC5qLoNy0IQ== X-CSE-MsgGUID: srUahHuQQu6pdMVxITyu+g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,324,1763452800"; d="scan'208";a="215752573" Received: from davehans-spike.ostc.intel.com (HELO localhost.localdomain) ([10.165.164.11]) by fmviesa010.fm.intel.com with ESMTP; 04 Mar 2026 10:10:17 -0800 Subject: [PATCH v4 0/4] x86/cpu: Take Intel platform into account for old microcode checks To: linux-kernel@vger.kernel.org Cc: sohil.mehta@intel.com, zhao1.liu@intel.com, Dave Hansen , Borislav Petkov , "H. Peter Anvin" , Ingo Molnar , Jon Kohler , Pawan Gupta , "Peter Zijlstra (Intel)" , Thomas Gleixner , Tony Luck , x86@kernel.org From: Dave Hansen Date: Wed, 04 Mar 2026 10:10:16 -0800 Message-Id: <20260304181016.85EC87C7@davehans-spike.ostc.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Chagnes from v3: * Fix handling of the Pentium II's "no platform" goofiness. Note: this was found in a Github Copilot review of the series. I wrote the solution. * Rebase to 7.0-rc2 Changes from v2: * Move new helpers from .h into .c file. This avoids the #include dependency issues for now. That can be dealt with another day. * Rename x86_platform_id to have an intel_ prefix and add a union to make it clear that AMD can use the space for something else Changes from v1: * Fix non-x86 PECI compile issues by lifting some x86 macros into an arch-independent header. * Make intel_get_platform_id() match its name and return an ID, not a mask. * Sort #includes * Move ->x86_platform_id comment The platform ID vs. platform mask confusion meant that v1 worked by total accident. If you tested v1, I'd really appreciate you retest this as well. -- There was a report[1] that CPUs running updated microcode were being reported as running old microcode. The reason is that the old microcode list neglects to take the platform ID into account. The platform ID is an Intel-only construct that allows CPUs that otherwise have the same model/family/stepping to take different microcode revisions. The microcode loader itself already checks this. Only the recent "old_microcode" checker failed here. Treat the platform ID as a peer of model/family/stepping. Store it in 'struct cpuinfo_x86', enable matching on it with with 'struct x86_cpu_id', and flesh out the 'old_microcode' list with it. This fixes the report of an inaccurate, false positive in the 'old_microcode' vulnerability file. 1. https://lore.kernel.org/all/38660F8F-499E-48CD-B58B-4822228A5941@nutanix.com/ Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: "H. Peter Anvin" Cc: Tony Luck Cc: Pawan Gupta Cc: "Peter Zijlstra (Intel)" Cc: x86@kernel.org Cc: Jon Kohler arch/x86/include/asm/microcode.h | 2 arch/x86/include/asm/processor.h | 5 arch/x86/kernel/cpu/intel.c | 1 arch/x86/kernel/cpu/match.c | 3 arch/x86/kernel/cpu/microcode/intel-ucode-defs.h | 398 +++++++++++++---------- arch/x86/kernel/cpu/microcode/intel.c | 55 ++- include/linux/mod_devicetable.h | 2 7 files changed, 294 insertions(+), 172 deletions(-)