Skip to content

platform/x86/intel/ifs: Support group-based In-Field Scan and Diamond Rapids

Ehab Ababneh linux-trace-kernel lkml platform-driver-x86 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest17 patches 0 repliesNew
  2. v217 patches 8 repliesSuperseded
  3. v117 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- Patch 11: the status and details files now report the result of the whole group instead of only the CPU written to run_test: status is "pass" only if all CPUs in the group passed, otherwise "fail" if any CPU failed or "untested" if any CPU was not fully tested, and details are those of the first such CPU. Patches 12, 16 and 17 describe this.
- Patch 11: when a group test times out or stops making progress, a CPU that completed all chunks is now reported as passed instead of untested; details now always match the per-CPU result (Sashiko).

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17platform/x86/intel/ifs: Revert SBAF featurearch/x86/include/asm/msr-index.h drivers/platform/x86/intel/ifs/core.c drivers/platform/x86/intel/ifs/ifs.h +4 more+5 -3640 replies
2/17platform/x86/intel/ifs: Fix IFS sysfs interfaces in the commentsdrivers/platform/x86/intel/ifs/ifs.h drivers/platform/x86/intel/ifs/load.c drivers/platform/x86/intel/ifs/runtest.c +1 more+24 -250 replies
3/17platform/x86/intel/ifs: Clarify In-Field Scan MSR bit macro definitionsarch/x86/include/asm/msr-index.h drivers/platform/x86/intel/ifs/core.c tools/arch/x86/include/asm/msr-index.h+14 -140 replies
4/17platform/x86/intel/ifs: Use u64 to define the bits of IFS MSR registersdrivers/platform/x86/intel/ifs/ifs.h+33 -330 replies
5/17platform/x86/intel/ifs: Early return on the IFS image hash/chunk errordrivers/platform/x86/intel/ifs/load.c+15 -190 replies
6/17platform/x86/intel/ifs: Refactor Array BIST function interfacedrivers/platform/x86/intel/ifs/runtest.c+12 -20 replies
7/17stop_machine: Add stop_cluster_cpuslocked() for per-cluster operationsinclude/linux/stop_machine.h kernel/stop_machine.c+37 -130 replies
8/17platform/x86/intel/ifs: Enumerate the bit to determine if CPUs need to join for IFS testsarch/x86/include/asm/msr-index.h drivers/platform/x86/intel/ifs/core.c drivers/platform/x86/intel/ifs/ifs.h+16 -00 replies
9/17platform/x86/intel/ifs: Select CPUs from topology_cluster_cpumask() for simultaneous IFS testsdrivers/platform/x86/intel/ifs/ifs.h drivers/platform/x86/intel/ifs/runtest.c+49 -120 replies
10/17platform/x86/intel/ifs: Warn if a group test fails with CPUs missingarch/x86/include/asm/msr-index.h drivers/platform/x86/intel/ifs/core.c drivers/platform/x86/intel/ifs/ifs.h +1 more+42 -00 replies
11/17platform/x86/intel/ifs: Track and report scan results on a per-CPU basisdrivers/platform/x86/intel/ifs/core.c drivers/platform/x86/intel/ifs/ifs.h drivers/platform/x86/intel/ifs/runtest.c+154 -490 replies
12/17platform/x86/intel/ifs: Add new sysfs interfaces {status, details, cpus_ran}_listdrivers/platform/x86/intel/ifs/sysfs.c+58 -00 replies
13/17platform/x86/intel/ifs: Add additional details sysfs interfacedrivers/platform/x86/intel/ifs/ifs.h drivers/platform/x86/intel/ifs/runtest.c drivers/platform/x86/intel/ifs/sysfs.c+30 -00 replies
14/17platform/x86/intel/ifs: Add Intel Diamond Rapids server supportdrivers/platform/x86/intel/ifs/core.c+1 -00 replies
15/17platform/x86/intel/ifs: Remove limit on number of batch filesDocumentation/ABI/testing/sysfs-platform-intel-ifs drivers/platform/x86/intel/ifs/sysfs.c+8 -40 replies
16/17platform/x86/intel/ifs: Update IFS documentationdrivers/platform/x86/intel/ifs/ifs.h+51 -220 replies
17/17Documentation/ABI: Update IFS ABI docDocumentation/ABI/testing/sysfs-platform-intel-ifs+34 -00 replies

Reviews trailers per patch

None of the 17 patches has a Reviewed-by or Acked-by.

PatchYi Lai
1/17T-b
2/17T-b
3/17T-b
4/17T-b
5/17T-b
6/17T-b
7/17T-b
8/17T-b
9/17T-b
10/17T-b
11/17T-b
12/17T-b
13/17T-b
14/17T-b
15/17T-b
16/17T-b
17/17T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/17] platform/x86/intel/ifs: Support group-based In-Field Scan and Diamond Rapids

Some Intel Xeon processors, starting with Diamond Rapids (DMR), share one SCAN test engine between multiple CPU cores in a module (Dual-Core Module, DCM), instead of only between the threads of a single core. All logical processors that share an engine must start the In-Field Scan (IFS) test at the same time. The current driver assumes the sharing domain is cpu_smt_mask(), which does not hold on these systems. Also, although the cores in a module are tested together, each core gets its own result: on a DCM, one core can pass while the other fails.

This series:

- Patch 1 removes the SBAF test, which is not planned for any CPU and whose test images were never published.

- Patches 2-6 are cleanups and preparatory refactoring (comment fixes, clearer MSR bit names, u64 MSR bitfields, early return on image errors, a generic Array BIST parameter struct). Patches 2-4 have no functional change.

- Patch 7 adds stop_cluster_cpuslocked(), the cluster-level counterpart of stop_core_cpuslocked(), so that all threads of a cluster can rendezvous and issue WRMSR at the same time.

- Patches 8-10 enumerate ALL_LP_JOIN_NEEDED, select the CPUs to test together from topology_cluster_cpumask(), and warn when a group test does not pass while some of the logical processors sharing the scan engine (per TID_BIT_SHIFT) were not in the group.

- Patches 11-13 record per-CPU results for group tests and expose them through new sysfs files (status_list, details_list, cpus_ran_list, addnl_details_list). The existing status and details files remain and report the result of the whole group: status is "pass" only if every CPU in the group passed.

- Patch 14 adds Diamond Rapids to the CPU match table.

- Patch 15 removes the 256 limit on the batch file number.

- Patches 16-17 update the IFS documentation and ABI document.

Most of this series was developed by Jithu Joseph and Qiuxu Zhuo, who have both since left Intel. I have taken over upstreaming it, so please send questions and review comments to me. The patches keep their original authorship and Signed-off-by tags, except patch 10, which I rewrote for v2 (Qiuxu is credited as co-developer). I have added my Signed-off-by to every patch.

Thanks to Ilpo Järvinen for taking the time to review v2.

Changes in v3:
- Patch 11: the status and details files now report the result of the whole group instead of only the CPU written to run_test: status is "pass" only if all CPUs in the group passed, otherwise "fail" if any CPU failed or "untested" if any CPU was not fully tested, and details are those of the first such CPU. Patches 12, 16 and 17 describe this.
- Patch 11: when a group test times out or stops making progress, a CPU that completed all chunks is now reported as passed instead of untested; details now always match the per-CPU result (Sashiko).

From Ilpo's review:
- Patches 8, 9, 12, 13, 14, 15: dropped the "[ Qiuxu: ... ]" notes. Qiuxu reworded those commit messages while carrying the patches internally.
- Patch 7: rewrote the first paragraph of the commit message so that it stands on its own and names Diamond Rapids; dropped the extra ':' in the stop_cluster_cpuslocked() kernel-doc.
- Patch 9: add an ifs_stop_cpus() helper that picks stop_cluster_cpuslocked() or stop_core_cpuslocked(); passive voice in the commit message; reference [2] moved to a Link: tag.
- Patch 10: use BIT(); include <linux/bits.h> and <linux/processor.h>; braces around the multi-line if.
- Patch 11: trailing comma in the ifs_devices[] initializer; local pointer and sizeof(*ptr) in the memset() loops; get_scan_status() is now a static function; a for_each_group_scan_status() iterator replaces the repeated per-CPU loops. Added my Co-developed-by.
- Patch 12: cpus_ran_list_show() returns sysfs_emit() directly.
- Patches 15, 16, 17: wrap documentation and ABI text to 80 columns.

v2: https://lore.kernel.org/all/[email protected]/

Changes in v2:
- Rebased onto v7.4-rc1.
- Tested on Emerald Rapids, Granite Rapids, Clearwater Forest and Diamond Rapids (Tested-by: Yi Lai on all patches).
- Patch 9: build the CPU group mask only after the CPU online and image loaded checks pass, so a rejected run_test write no longer changes the group reported by the *_list files (Sashiko).
- Patch 10: reworked, with a new title (was "Validate TID_BIT_SHIFT matches topology_cluster_cpumask()"). The check at driver init is
gone: it failed driver load on Sapphire Rapids and Emerald Rapids, which don't enumerate TID_BIT_SHIFT, when a CPU in the group was offline, and on parts that expose only one core per module. Now TID_BIT_SHIFT is read at init and, if a test does not pass, the driver warns when not all logical processors in the TID_BIT_SHIFT range were in the group. The test always runs (Sashiko, suggested by Tony Luck). Author changed to me, with Qiuxu as Co-developed-by.
- Patch 11:
- clear the per-CPU results of the group at the start of each test, and clear them in ifs_init() before the devices are registered (Sashiko);
- restart an interrupted test from the lowest chunk reached by any

    CPU in the group (Sashiko);

- don't overwrite error codes reported by the hardware with the driver's timeout or partial-completion code; report a CPU that stopped early without an error code as partially completed (Sashiko);
- the patch 10 warning checks the results of all CPUs in the group;
- commit message: explain that cores in a group can report different results.
- Patches 12, 13: read the CPU group mask only once in the *_list show functions (Sashiko).
- Patch 16: fix typos; say "group" instead of "core"; use the real attribute name addnl_details in the commit message; describe what happens with offline CPUs instead of requiring all CPUs in a group to be online (Sashiko).

v1: https://lore.kernel.org/all/[email protected]/

Ehab Ababneh (1):
platform/x86/intel/ifs: Warn if a group test fails with CPUs missing

Jithu Joseph (7):
platform/x86/intel/ifs: Refactor Array BIST function interface platform/x86/intel/ifs: Enumerate the bit to determine if CPUs need to
join for IFS tests
platform/x86/intel/ifs: Select CPUs from topology_cluster_cpumask()
for simultaneous IFS tests
platform/x86/intel/ifs: Track and report scan results on a per-CPU
basis
platform/x86/intel/ifs: Add new sysfs interfaces {status, details,
cpus_ran}_list
platform/x86/intel/ifs: Add additional details sysfs interface platform/x86/intel/ifs: Add Intel Diamond Rapids server support

Qiuxu Zhuo (8):
platform/x86/intel/ifs: Revert SBAF feature platform/x86/intel/ifs: Fix IFS sysfs interfaces in the comments platform/x86/intel/ifs: Clarify In-Field Scan MSR bit macro
definitions
platform/x86/intel/ifs: Use u64 to define the bits of IFS MSR
registers
platform/x86/intel/ifs: Early return on the IFS image hash/chunk error
stop_machine: Add stop_cluster_cpuslocked() for per-cluster operations platform/x86/intel/ifs: Update IFS documentation Documentation/ABI: Update IFS ABI doc

Tony Luck (1):
platform/x86/intel/ifs: Remove limit on number of batch files

 .../ABI/testing/sysfs-platform-intel-ifs      |  44 +-
 arch/x86/include/asm/msr-index.h              |  17 +-
 drivers/platform/x86/intel/ifs/core.c         |  62 ++-
 drivers/platform/x86/intel/ifs/ifs.h          | 236 ++++-----
 drivers/platform/x86/intel/ifs/load.c         |  52 +-
 drivers/platform/x86/intel/ifs/runtest.c      | 479 ++++++++----------
 drivers/platform/x86/intel/ifs/sysfs.c        | 107 +++-
 include/linux/stop_machine.h                  |  15 +
 include/trace/events/intel_ifs.h              |  27 -
 kernel/stop_machine.c                         |  35 +-
 tools/arch/x86/include/asm/msr-index.h        |  14 +-
 11 files changed, 557 insertions(+), 531 deletions(-)

base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4

Signature · 1 line
2.43.0