Re: [PATCH v10 1/4] ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events

From: Shuai Xue
Date: Thu Dec 21 2023 - 20:08:13 EST




On 2023/12/21 21:55, Rafael J. Wysocki wrote:
> On Mon, Dec 18, 2023 at 7:45 AM Shuai Xue <xueshuai@xxxxxxxxxxxxxxxxx> wrote:
>>
>> There are two major types of uncorrected recoverable (UCR) errors :
>>
>> - Synchronous error: The error is detected and raised at the point of the
>> consumption in the execution flow, e.g. when a CPU tries to access
>> a poisoned cache line. The CPU will take a synchronous error exception
>> such as Synchronous External Abort (SEA) on Arm64 and Machine Check
>> Exception (MCE) on X86. OS requires to take action (for example, offline
>> failure page/kill failure thread) to recover this uncorrectable error.
>>
>> - Asynchronous error: The error is detected out of processor execution
>> context, e.g. when an error is detected by a background scrubber. Some data
>> in the memory are corrupted. But the data have not been consumed. OS is
>> optional to take action to recover this uncorrectable error.
>>
>> When APEI firmware first is enabled, a platform may describe one error
>> source for the handling of synchronous errors (e.g. MCE or SEA notification
>> ), or for handling asynchronous errors (e.g. SCI or External Interrupt
>> notification). In other words, we can distinguish synchronous errors by
>> APEI notification. For synchronous errors, kernel will kill the current
>> process which accessing the poisoned page by sending SIGBUS with
>> BUS_MCEERR_AR. In addition, for asynchronous errors, kernel will notify the
>> process who owns the poisoned page by sending SIGBUS with BUS_MCEERR_AO in
>> early kill mode. However, the GHES driver always sets mf_flags to 0 so that
>> all synchronous errors are handled as asynchronous errors in memory failure.
>>
>> To this end, set memory failure flags as MF_ACTION_REQUIRED on synchronous
>> events.
>>
>> Signed-off-by: Shuai Xue <xueshuai@xxxxxxxxxxxxxxxxx>
>> Tested-by: Ma Wupeng <mawupeng1@xxxxxxxxxx>
>> Reviewed-by: Kefeng Wang <wangkefeng.wang@xxxxxxxxxx>
>> Reviewed-by: Xiaofei Tan <tanxiaofei@xxxxxxxxxx>
>> Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
>> Reviewed-by: James Morse <james.morse@xxxxxxx>
>
> Applied as 6.8 material.
>
> The other patches in the series still need to receive tags from the
> APEI designated reviewers (as per MAINTAINERS).
>
> Thanks!
>

Thank you :)

I will wait more feedback of other patches from MAINTAINERS.

Cheers,
Shuai