-
Notifications
You must be signed in to change notification settings - Fork 92
[Deepin-Kernel-SIG] [linux 6.6-y] [Upstream] [Intel] Intel: support In Field Scan(IFS) SBAF on GNR #905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ANBZ: #10908 commit def1ed0 upstream. Enable the trace function on all HT threads. Currently, the trace is called from some arbitrary CPU where the test was invoked. This change gives visibility to the exact errors as seen by each participating HT threads, and not just what was seen from the primary thread. Sample output below. # TASK-PID CPU# ||||| TIMESTAMP FUNCTION # | | | ||||| | | migration/0-18 [000] d..1. 527287.084668: start: 0000, stop: 007f, status: 0000000000007f80 migration/128-785 [128] d..1. 527287.084669: start: 0000, stop: 007f, status: 0000000000007f80 Intel-SIG: commit def1ed0 platform/x86/intel/ifs: Trace on all HT threads when executing a test Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Signed-off-by: Ashok Raj <[email protected]> Reviewed-by: Tony Luck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit e272d1e upstream. Add the current batch number in the trace output. When there are failures, it's important to know which test content resulted in failure. # TASK-PID CPU# ||||| TIMESTAMP FUNCTION # | | | ||||| | | migration/0-18 [000] d..1. 527287.084668: ifs_status: batch: 02, start: 0000, stop: 007f, status: 0000000000007f80 migration/128-785 [128] d..1. 527287.084669: ifs_status: batch: 02, start: 0000, stop: 007f, status: 0000000000007f80 Intel-SIG: commit e272d1e platform/x86/intel/ifs: Add current batch number to trace output Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Signed-off-by: Ashok Raj <[email protected]> Reviewed-by: Tony Luck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
…dezvous for ARRAY_BIST ANBZ: #10908 commit ea15f34 upstream. ARRAY_BIST requires the test to be invoked only from one of the HT siblings of a core. If the other sibling was in mwait(), that didn't permit the test to complete and resulted in several retries before the test could finish. The exit rendezvous was introduced to keep the HT sibling busy until the primary CPU completed the test to avoid those retries. What is actually needed is to ensure that both the threads rendezvous *before* the wrmsr to trigger the test to give good chance to complete the test. The `stop_machine()` function returns only after all the CPUs complete running the function, and provides an exit rendezvous implicitly. In kernel/stop_machine.c::multi_cpu_stop(), every CPU in the mask needs to complete reaching MULTI_STOP_RUN. When all CPUs complete, the state machine moves to next state, i.e MULTI_STOP_EXIT. Thus the underlying API stop_core_cpuslocked() already provides an exit rendezvous. Add the rendezvous earlier in order to ensure the wrmsr is triggered after all CPUs reach the do_array_test(). Remove the exit rendezvous since stop_core_cpuslocked() already guarantees that. Intel-SIG: commit ea15f34 platform/x86/intel/ifs: Replace the exit rendezvous with an entry rendezvous for ARRAY_BIST Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Signed-off-by: Ashok Raj <[email protected]> Reviewed-by: Tony Luck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit ad630f5 upstream. The activation for Scan at Field (SAF) includes a parameter to make microcode wait for both threads to join. It's preferable to perform an entry rendezvous before the activation to ensure that they start the `wrmsr` close enough to each other. In some cases it has been observed that one of the threads might be just a bit late to arrive. An entry rendezvous reduces the likelihood of these cases occurring. Add an entry rendezvous to ensure the activation on both threads happen close enough to each other. Intel-SIG: commit ad630f5 platform/x86/intel/ifs: Add an entry rendezvous for SAF Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Signed-off-by: Ashok Raj <[email protected]> Reviewed-by: Tony Luck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit 682c259 upstream. The ret variable is unconditionally assigned in ifs_load_firmware(). Therefore, remove its unnecessary initialization. Intel-SIG: commit 682c259 platform/x86/intel/ifs: Remove unnecessary initialization of 'ret' Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Reviewed-by: Ashok Raj <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit 02153e5 upstream. "Scan controller error" means that scan hardware encountered an error prior to doing an actual test on the target CPU. It does not mean that there is an actual cpu/core failure. "scan signature failure" indicates that the test result on the target core did not match the expected value and should be treated as a cpu failure. Current driver classifies both these scenarios as failures. Modify the driver to classify this situation with a more appropriate "untested" status instead of "fail" status. Intel-SIG: commit 02153e5 platform/x86/intel/ifs: Classify error scenarios correctly Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Signed-off-by: Jithu Joseph <[email protected]> Reviewed-by: Tony Luck <[email protected]> Reviewed-by: Ashok Raj <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit 15b429f upstream. In Field Scan test image files are named in ff-mm-ss-<batch02x>.scan format. Current trace output, prints the batch number in decimal format. Make it easier to correlate the trace line to a test image file by showing the batch number also in hex format. Add 0x prefix to all fields in the trace line to make the type explicit. Intel-SIG: commit 15b429f platform/x86/intel/ifs: trace: display batch num in hex Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Signed-off-by: Jithu Joseph <[email protected]> Reviewed-by: Tony Luck <[email protected]> Reviewed-by: Ashok Raj <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit bd25a3f upstream. One of the stages in IFS image loading process involves loading individual chunks (test patterns) from test image file to secure memory. Driver issues a WRMSR(MSR_AUTHENTICATE_AND_COPY_CHUNK) operation to do this. This operation can take up to 5 msec, and if an interrupt occurs in between, the AUTH_AND_COPY_CHUNK u-code implementation aborts the operation. Interrupt sources such as NMI or SMI are handled by retrying. Regular interrupts may occur frequently enough to prevent this operation from ever completing. Disable irq on local cpu around the aforementioned WRMSR to allow the operation to complete. Intel-SIG: commit bd25a3f platform/x86/intel/ifs: Disable irq during one load stage Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Signed-off-by: Jithu Joseph <[email protected]> Reviewed-by: Tony Luck <[email protected]> Reviewed-by: Ashok Raj <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit 8e51106 upstream. IFS (In Field Scan) driver exposes its functionality via sysfs interfaces. Applications prepare and exercise the tests by interacting with the aforementioned sysfs files. Verify that the necessary sysfs entries are created after loading the IFS driver. Initialize test variables needed for building subsequent kself-test cases. Intel-SIG: commit 8e51106 selftests: ifs: verify test interfaces are created by the driver Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Reviewed-by: Jithu Joseph <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Co-developed-by: Ashok Raj <[email protected]> Signed-off-by: Ashok Raj <[email protected]> Signed-off-by: Pengfei Xu <[email protected]> Acked-by: Jithu Joseph <[email protected]> Signed-off-by: Shuah Khan <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit 20cef30 upstream. Scan test image files have to be loaded before starting IFS test. Verify that In Field scan driver is able to load valid test image files. Also check if loading an invalid test image file fails. Intel-SIG: commit 20cef30 selftests: ifs: verify test image loading functionality Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Reviewed-by: Jithu Joseph <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Co-developed-by: Ashok Raj <[email protected]> Signed-off-by: Ashok Raj <[email protected]> Signed-off-by: Pengfei Xu <[email protected]> Acked-by: Jithu Joseph <[email protected]> Signed-off-by: Shuah Khan <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit 3170f7a upstream. Two selftests are added to verify IFS scan test feature: 1. Perform IFS scan test once on each CPU using all the available image files. 2. Perform IFS scan test with the default image on a random cpu for 3 rounds. Intel-SIG: commit 3170f7a selftests: ifs: verify IFS scan test functionality Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Reviewed-by: Jithu Joseph <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Co-developed-by: Ashok Raj <[email protected]> Signed-off-by: Ashok Raj <[email protected]> Signed-off-by: Pengfei Xu <[email protected]> Acked-by: Jithu Joseph <[email protected]> Signed-off-by: Shuah Khan <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit bb408da upstream. There are two selftest scenarios for ARRAY BIST(Board Integrated System Test) tests: 1. Perform IFS ARRAY BIST tests once on each CPU. 2. Perform IFS ARRAY BIST tests on a random CPU with 3 rounds. These are not meant to be exhaustive, but are some minimal tests for for checking IFS ARRAY BIST. Intel-SIG: commit bb408da selftests: ifs: verify IFS ARRAY BIST functionality Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Reviewed-by: Jithu Joseph <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Co-developed-by: Ashok Raj <[email protected]> Signed-off-by: Ashok Raj <[email protected]> Signed-off-by: Pengfei Xu <[email protected]> Acked-by: Jithu Joseph <[email protected]> Signed-off-by: Shuah Khan <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit 7e597d4 upstream. IFS tests such as Scan at Field (SAF) or Structural Based Functional Test at Field (SBAF), require the user to load a test image. The image loading process is similar across these tests, with the only difference being MSR addresses used. To reuse the code between these tests, remove the hard coding of MSR addresses and allow the driver to pass the MSR addresses per IFS test (via driver device data). Add a new structure named "struct ifs_test_msrs" to specify the test-specific MSR addresses. Each IFS test will provide this structure, enabling them to reuse the common code. This is a preliminary patch in preparation for the addition of SBAF support. Intel-SIG: commit 7e597d4 platform/x86/intel/ifs: Refactor MSR usage in IFS test code Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Reviewed-by: Ashok Raj <[email protected]> Reviewed-by: Tony Luck <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: https://lore.kernel.org/r/20240801051814.1935149-2-sathyanarayanan.kuppuswamy@linux.intel.com Signed-off-by: Hans de Goede <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit 0a3e4e9 upstream. Structural Based Functional Test at Field (SBAF) is a new type of testing that provides comprehensive core test coverage complementing existing IFS tests like Scan at Field (SAF) or ArrayBist. SBAF device will appear as a new device instance (intel_ifs_2) under /sys/devices/virtual/misc. The user interaction necessary to load the test image and test a particular core is the same as the existing scan test (intel_ifs_0). During the loading stage, the driver will look for a file named ff-mm-ss-<batch02x>.sbft in the /lib/firmware/intel/ifs_2 directory. The hardware interaction needed for loading the image is similar to SAF, with the only difference being the MSR addresses used. Reuse the SAF image loading code, passing the SBAF-specific MSR addresses via struct ifs_test_msrs in the driver device data. Unlike SAF, the SBAF test image chunks are further divided into smaller logical entities called bundles. Since the SBAF test is initiated per bundle, cache the maximum number of bundles in the current image, which is used for iterating through bundles during SBAF test execution. Intel-SIG: commit 0a3e4e9 platform/x86/intel/ifs: Add SBAF test image loading support Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Reviewed-by: Ashok Raj <[email protected]> Reviewed-by: Tony Luck <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Jithu Joseph <[email protected]> Co-developed-by: Kuppuswamy Sathyanarayanan <[email protected]> Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: https://lore.kernel.org/r/20240801051814.1935149-3-sathyanarayanan.kuppuswamy@linux.intel.com Signed-off-by: Hans de Goede <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit 3c4d06b upstream. In a core, the SBAF test engine is shared between sibling CPUs. An SBAF test image contains multiple bundles. Each bundle is further composed of subunits called programs. When a SBAF test (for a particular core) is triggered by the user, each SBAF bundle from the loaded test image is executed sequentially on all the threads on the core using the stop_core_cpuslocked mechanism. Each bundle execution is initiated by writing to MSR_ACTIVATE_SBAF. SBAF test bundle execution may be aborted when an interrupt occurs or if the CPU does not have enough power budget for the test. In these cases the kernel restarts the test from the aborted bundle. SBAF execution is not retried if the test fails or if the test makes no forward progress after 5 retries. Intel-SIG: commit 3c4d06b platform/x86/intel/ifs: Add SBAF test support Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Reviewed-by: Ashok Raj <[email protected]> Reviewed-by: Tony Luck <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Jithu Joseph <[email protected]> Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: https://lore.kernel.org/r/20240801051814.1935149-4-sathyanarayanan.kuppuswamy@linux.intel.com Signed-off-by: Hans de Goede <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit 61b7496 upstream. Add tracing support for the SBAF IFS tests, which may be useful for debugging systems that fail these tests. Log details like test content batch number, SBAF bundle ID, program index and the exact errors or warnings encountered by each HT thread during the test. Intel-SIG: commit 61b7496 trace: platform/x86/intel/ifs: Add SBAF trace support Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Reviewed-by: Ashok Raj <[email protected]> Reviewed-by: Tony Luck <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Reviewed-by: Steven Rostedt (Google) <[email protected]> Signed-off-by: Jithu Joseph <[email protected]> Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: https://lore.kernel.org/r/20240801051814.1935149-5-sathyanarayanan.kuppuswamy@linux.intel.com Signed-off-by: Hans de Goede <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
ANBZ: #10908 commit 1e70137 upstream. In commit # 0a3e4e9 ("platform/x86/intel/ifs: Add SBAF test image loading support"), the documentation for "Structural Based Functional Test at Field (SBAF)" had an incomplete underline. This resulted in the following build warning: Documentation/arch/x86/ifs:2: drivers/platform/x86/intel/ifs/ifs.h:131: WARNING: Title underline too short. Fix it by extending the dotted lines to match the length of the title. Intel-SIG: commit 1e70137 platform/x86/intel/ifs: Fix SBAF title underline length Backport to support Intel IFS(In Field Scan) SBAF(Structural Based Functional Test at Field) Fixes: 0a3e4e9 ("platform/x86/intel/ifs: Add SBAF test image loading support") Reported-by: Stephen Rothwell <[email protected]> Closes: https://lore.kernel.org/lkml/[email protected]/T/#u Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Reviewed-by: Jithu Joseph <[email protected]> Link: https://lore.kernel.org/r/20240823184337.2923179-1-sathyanarayanan.kuppuswamy@linux.intel.com Signed-off-by: Hans de Goede <[email protected]> [ Aichun Shi: amend commit log ] Signed-off-by: Aichun Shi <[email protected]>
Reviewer's GuideThis PR integrates Intel IFS SBAF support on the GNR platform by introducing a new SBAF test mode, refactoring MSR handling via a unified test_msrs abstraction, consolidating CPU rendezvous logic, extending driver metadata and firmware loading, updating trace instrumentation, and adding comprehensive kselftest scripts. Sequence diagram for SBAF test execution on a CPU coresequenceDiagram
participant User as actor User
participant Kernel as Kernel
participant IFS as IFS Driver
participant CPU as CPU Core
User->>Kernel: Initiate SBAF test via sysfs (intel_ifs_2)
Kernel->>IFS: do_core_test(cpu, dev) with IFS_TYPE_SBAF
IFS->>IFS: Prepare sbaf_run_params
IFS->>CPU: stop_core_cpuslocked(cpu, dosbaf, &sbaf_run_params)
CPU->>CPU: wait_for_sibling_cpu(&sbaf_cpus_in)
CPU->>CPU: wrmsrl(MSR_ACTIVATE_SBAF, ...)
CPU->>CPU: rdmsrl(MSR_SBAF_STATUS, ...)
CPU->>IFS: Return SBAF status
IFS->>IFS: Update scan_details, status
IFS->>Kernel: Return test result
Kernel->>User: Report SBAF test outcome
ER diagram for new and updated IFS device and test relationshipserDiagram
IFS_DEVICE ||--o{ IFS_TEST_CAPS : uses
IFS_DEVICE ||--o{ IFS_TEST_MSRS : uses
IFS_DEVICE ||--o{ IFS_DATA : has
IFS_DATA ||--o{ IFS_SBAF : uses
IFS_DATA ||--o{ IFS_SBAF_STATUS : uses
IFS_TEST_CAPS {
int integrity_cap_bit
int test_num
char image_suffix
}
IFS_TEST_MSRS {
u32 copy_hashes
u32 copy_hashes_status
u32 copy_chunks
u32 copy_chunks_status
u32 test_ctrl
}
IFS_DATA {
int loaded_version
int valid_chunks
int loaded
u32 status
u64 scan_details
u32 cur_batch
u32 generation
u32 chunk_size
u32 array_gen
u32 max_bundle
}
IFS_SBAF {
u64 data
u32 bundle_idx
u32 pgm_idx
u32 delay
}
IFS_SBAF_STATUS {
u64 data
u32 bundle_idx
u32 pgm_idx
u32 error_code
u32 test_fail
u32 sbaf_status
}
Class diagram for new SBAF test execution parameters and flowclassDiagram
class run_params {
+ifs_data* ifsd
+union ifs_scan* activate
+union ifs_status status
}
class sbaf_run_params {
+ifs_data* ifsd
+int* retry_cnt
+union ifs_sbaf* activate
+union ifs_sbaf_status status
}
run_params --> ifs_data
run_params --> ifs_scan
run_params --> ifs_status
sbaf_run_params --> ifs_data
sbaf_run_params --> ifs_sbaf
sbaf_run_params --> ifs_sbaf_status
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR supports Intel In Field Scan (IFS) SBAF on the GNR platform by integrating upstream commits for both SAF and the new SBAF tests.
- Added selftests and Makefile updates for IFS testing
- Updated trace events and driver code (runtest.c, load.c, core.c, ifs.h) to support SBAF functionality
- Modified MSR definitions and documentation to incorporate SBAF support
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
tools/testing/selftests/drivers/platform/x86/intel/ifs/* | Added new selftest script and Makefile changes |
include/trace/events/intel_ifs.h | Updated trace event definitions for batching |
drivers/platform/x86/intel/ifs/runtest.c | Refactored scan test code and added concurrency support |
drivers/platform/x86/intel/ifs/load.c | Adjusted MSR usage for SBAF-related operations |
drivers/platform/x86/intel/ifs/ifs.h | Added new SBAF MSR and bit field definitions |
drivers/platform/x86/intel/ifs/core.c | Integrated SBAF test support within core test routines |
arch/x86/include/asm/msr-index.h | Added SBAF integrity cap definitions |
MAINTAINERS | Updated file list for new selftest location |
Comments suppressed due to low confidence (1)
drivers/platform/x86/intel/ifs/core.c:60
- The image_suffix for the SBAF test is set to "sbft" but the PR title and description refer to SBAF. Consider verifying if the suffix should be updated to "sbaF" for consistency.
static const struct ifs_test_caps sbaf_test = {
append_log "[$INFO] echo $on_off > \ | ||
${CPU_SYSFS}/cpu${i}/online" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The logging statement using a backslash to continue the command on a new line may reduce readability. Consider reformatting the log message to be a single coherent line for clarity.
append_log "[$INFO] echo $on_off > \ | |
${CPU_SYSFS}/cpu${i}/online" | |
append_log "[$INFO] echo $on_off > ${CPU_SYSFS}/cpu${i}/online" |
Copilot uses AI. Check for mistakes.
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Avenger-285714 - I've reviewed your changes and they look great!
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
commit 744a6a1
|
bugzilla: https://bugzilla.openanolis.cn/show_bug.cgi?id=10908
Intel In Field Scan (IFS) is a hardware feature to run circuit level tests on a CPU core to detect problems that are not caught by parity or ECC checks.
This PR is to support Intel In Field Scan(IFS) SBAF(Structural Based Functional Test at Field) on GNR platform.
Upstream commits from v6.9 to v6.12(18 commits):
1e70137 platform/x86/intel/ifs: Fix SBAF title underline length
3114f77 platform/x86/intel/ifs: Initialize union ifs_status to zero
61b7496 trace: platform/x86/intel/ifs: Add SBAF trace support
3c4d06b platform/x86/intel/ifs: Add SBAF test support
0a3e4e9 platform/x86/intel/ifs: Add SBAF test image loading support
7e597d4 platform/x86/intel/ifs: Refactor MSR usage in IFS test code
bb408da selftests: ifs: verify IFS ARRAY BIST functionality
3170f7a selftests: ifs: verify IFS scan test functionality
20cef30 selftests: ifs: verify test image loading functionality
8e51106 selftests: ifs: verify test interfaces are created by the driver
bd25a3f platform/x86/intel/ifs: Disable irq during one load stage
15b429f platform/x86/intel/ifs: trace: display batch num in hex
02153e5 platform/x86/intel/ifs: Classify error scenarios correctly
682c259 platform/x86/intel/ifs: Remove unnecessary initialization of 'ret'
ad630f5 platform/x86/intel/ifs: Add an entry rendezvous for SAF
ea15f34 platform/x86/intel/ifs: Replace the exit rendezvous with an entry rendezvous for ARRAY_BIST
e272d1e platform/x86/intel/ifs: Add current batch number to trace output
def1ed0 platform/x86/intel/ifs: Trace on all HT threads when executing a test
[ deepin: Drop ("platform/x86/intel/ifs: Initialize union ifs_status to zero") because of merged before. ]
One upstream commit is removed for compile issue:
490d573 platform/x86/intel/ifs: Switch to new Intel CPU model defines
Test
Built and run the kernel successfully.
Test is PASS on GNR platform.
Configs
CONFIG_INTEL_IFS = m
Link: https://gitee.com/anolis/cloud-kernel/pulls/3860
Summary by Sourcery
Backport Intel In Field Scan (IFS) SBAF support to the GNR platform by integrating upstream commits, introducing SBAF runtime logic, MSR definitions, trace events and selftests into the intel_ifs driver.
New Features:
dosbaf
andifs_sbaf_test_core
and dispatch SBAF tests indo_core_test
Enhancements:
ifs_test_msrs
abstraction to unify MSR accesses across scan and SBAF testswait_for_sibling_cpu
and apply it to scan, array and SBAF flowsruntest.c
to use unifiedrun_params
structures for passing activation and status dataload.c
to usetest_msrs
Build:
Documentation:
ifs.h
ifs_sbaf
tracepoint and update existing trace events to report batch indicesTests:
test_ifs.sh
selftest script covering scan, array BIST and SBAF scenariosdrivers/platform/x86/intel/ifs
testsChores: