linux-stable/drivers/acpi
Shuai Xue 7cb4103166 ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events
[ Upstream commit a70297d221 ]

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@linux.alibaba.com>
Tested-by: Ma Wupeng <mawupeng1@huawei.com>
Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Xiaofei Tan <tanxiaofei@huawei.com>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Reviewed-by: James Morse <james.morse@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-23 08:54:38 +01:00
..
acpica ACPICA: Add AML_NO_OPERAND_RESOLVE flag to Timer 2023-09-23 11:09:55 +02:00
apei ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events 2024-02-23 08:54:38 +01:00
arm64 perf/smmuv3: Enable HiSilicon Erratum 162001900 quirk for HIP08/09 2023-09-23 11:09:55 +02:00
dptf
nfit ACPI: NFIT: fix a potential deadlock during NFIT teardown 2023-03-03 11:45:52 +01:00
numa ACPI: HMAT: Fix initiator registration for single-initiator systems 2022-12-08 11:28:45 +01:00
pmic
x86 ACPI: x86: s2idle: Catch multiple ACPI_TYPE_PACKAGE objects 2023-09-23 11:09:55 +02:00
ac.c
acpi_adxl.c
acpi_amba.c
acpi_apd.c
acpi_cmos_rtc.c
acpi_configfs.c
acpi_dbg.c
acpi_extlog.c ACPI: extlog: fix NULL pointer dereference check 2024-02-23 08:54:38 +01:00
acpi_fpdt.c ACPI: FPDT: properly handle invalid FPDT subtables 2023-11-28 16:56:29 +00:00
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c ACPI: LPIT: Avoid u32 multiplication overflow 2024-01-25 14:52:33 -08:00
acpi_lpss.c ACPI: LPSS: Fix the fractional clock divider flags 2024-01-25 14:52:34 -08:00
acpi_memhotplug.c
acpi_pad.c
acpi_platform.c
acpi_pnp.c
acpi_processor.c
acpi_tad.c
acpi_video.c ACPI: video: Add quirk for the Colorful X15 AT 23 Laptop 2024-02-23 08:54:38 +01:00
acpi_watchdog.c
battery.c ACPI: battery: Fix missing NUL-termination with large strings 2023-03-10 09:39:11 +01:00
bgrt.c
blacklist.c
bus.c ACPI: VIOT: Fix ACS setup 2022-08-17 14:23:11 +02:00
button.c
container.c
cppc_acpi.c ACPI: CPPC: Do not prevent CPPC from working in the future 2022-08-17 14:24:25 +02:00
custom_method.c
debugfs.c
device_pm.c
device_sysfs.c ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias() 2023-11-20 11:08:16 +01:00
dock.c
ec.c ACPI: EC: Fix oops when removing custom query handlers 2023-05-24 17:36:44 +01:00
ec_sys.c
event.c
evged.c
fan.c
fan.h
glue.c
hed.c
internal.h
ioapic.c
irq.c ACPI: irq: Fix incorrect return value in acpi_register_gsi() 2023-10-25 11:59:02 +02:00
Kconfig
Makefile
nvs.c
osi.c
osl.c
pci_irq.c
pci_link.c
pci_mcfg.c PCI/ACPI: Guard ARM64-specific mcfg_quirks 2022-08-25 11:40:36 +02:00
pci_root.c ACPI: APEI: explicit init of HEST and GHES in apci_init() 2022-08-17 14:23:11 +02:00
pci_slot.c
platform_profile.c
power.c
pptt.c
prmt.c ACPI: PRM: Check whether EFI runtime is available 2023-01-24 07:22:45 +01:00
proc.c
processor_core.c
processor_driver.c
processor_idle.c ACPI: processor idle: Practically limit "Dummy wait" workaround to old Intel systems 2023-02-06 07:59:01 +01:00
processor_pdc.c ACPI: processor: Fix evaluating _PDC method when running as Xen dom0 2023-05-11 23:00:22 +09:00
processor_perflib.c ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily 2023-08-03 10:22:46 +02:00
processor_thermal.c ACPI: processor: Remove freq Qos request for all CPUs 2022-08-31 17:16:48 +02:00
processor_throttling.c
property.c ACPI: property: Return type of acpi_add_nondev_subnodes() should be bool 2022-08-25 11:40:10 +02:00
reboot.c
resource.c ACPI: resource: Add another DMI match for the TongFang GMxXGxx 2024-01-25 14:52:31 -08:00
sbs.c
sbshc.c
sbshc.h
scan.c ACPI: scan: Add LATT2021 to acpi_ignore_dep_ids[] 2022-11-26 09:24:31 +01:00
sleep.c ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep() 2023-06-28 10:29:42 +02:00
sleep.h
spcr.c
sysfs.c ACPI: sysfs: Fix BERT error region memory mapping 2022-05-30 09:28:58 +02:00
tables.c
thermal.c ACPI: thermal: Drop nocrt parameter 2023-09-02 09:17:07 +02:00
tiny-power-button.c
utils.c
video_detect.c ACPI: video: Add backlight=native DMI quirk for Lenovo Ideapad Z470 2023-09-23 11:09:55 +02:00
viot.c ACPI: VIOT: Initialize the correct IOMMU fwspec 2023-05-11 23:00:23 +09:00
wakeup.c