acrn-kernel/drivers/acpi
Shuai Xue 185d97e5be ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events
[ Upstream commit a70297d2213253853e95f5b49651f924990c6d3b ]

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-05 20:12:47 +00:00
..
acpica ACPICA: Add AML_NO_OPERAND_RESOLVE flag to Timer 2023-09-23 11:11:00 +02:00
apei ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events 2024-02-05 20:12:47 +00:00
arm64 perf/smmuv3: Enable HiSilicon Erratum 162001900 quirk for HIP08/09 2023-09-23 11:11:00 +02:00
dptf
nfit
numa ACPI: NUMA: Fix the logic of getting the fake_pxm value 2024-02-05 20:12:47 +00:00
pmic
x86 ACPI: x86: s2idle: Catch multiple ACPI_TYPE_PACKAGE objects 2023-09-23 11:11:00 +02:00
Kconfig
Makefile
ac.c
acpi_adxl.c
acpi_amba.c
acpi_apd.c ACPI: processor: Check for null return of devm_kzalloc() in fch_misc_setup() 2023-05-24 17:32:35 +01:00
acpi_cmos_rtc.c
acpi_configfs.c
acpi_dbg.c
acpi_extlog.c ACPI: extlog: fix NULL pointer dereference check 2024-02-05 20:12:47 +00:00
acpi_fpdt.c ACPI: FPDT: properly handle invalid FPDT subtables 2023-11-28 17:07:12 +00:00
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c ACPI: LPIT: Avoid u32 multiplication overflow 2024-01-25 15:27:19 -08:00
acpi_lpss.c ACPI: LPSS: Fix the fractional clock divider flags 2024-01-25 15:27:20 -08:00
acpi_memhotplug.c
acpi_pad.c
acpi_pcc.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-05 20:12:47 +00:00
acpi_watchdog.c
battery.c ACPI: battery: Fix missing NUL-termination with large strings 2023-03-10 09:32:56 +01:00
bgrt.c
blacklist.c
bus.c ACPI: bus: Ensure that notify handlers are not running after removal 2023-05-11 23:03:16 +09:00
button.c
container.c
cppc_acpi.c
custom_method.c
debugfs.c
device_pm.c PCI/ACPI: Account for _S0W of the target bridge in acpi_pci_bridge_d3() 2023-03-11 13:55:33 +01:00
device_sysfs.c ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias() 2023-11-20 11:51:55 +01:00
dock.c
ec.c ACPI: EC: Add quirk for HP 250 G7 Notebook PC 2023-11-28 17:06:56 +00:00
ec_sys.c
event.c
evged.c
fan.h
fan_attr.c
fan_core.c
glue.c
hed.c
internal.h
ioapic.c
irq.c ACPI: irq: Fix incorrect return value in acpi_register_gsi() 2023-10-25 12:03:14 +02:00
nvs.c
osi.c
osl.c
pci_irq.c
pci_link.c
pci_mcfg.c
pci_root.c
pci_slot.c
pfr_telemetry.c
pfr_update.c
platform_profile.c
power.c ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini 2023-05-11 23:03:38 +09:00
pptt.c ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent 2023-03-22 13:34:04 +01:00
prmt.c
proc.c
processor_core.c
processor_driver.c
processor_idle.c
processor_pdc.c ACPI: processor: Fix evaluating _PDC method when running as Xen dom0 2023-05-11 23:03:11 +09:00
processor_perflib.c ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily 2023-08-03 10:24:18 +02:00
processor_thermal.c
processor_throttling.c
property.c acpi: property: Let args be NULL in __acpi_node_get_property_reference 2024-01-25 15:27:46 -08:00
reboot.c
resource.c ACPI: resource: Add another DMI match for the TongFang GMxXGxx 2024-01-20 11:50:10 +01:00
sbs.c
sbshc.c
sbshc.h
scan.c iommu: Avoid more races around device probe 2023-12-13 18:39:17 +01:00
sleep.c ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep() 2023-06-28 11:12:22 +02:00
sleep.h
spcr.c
sysfs.c
tables.c
thermal.c ACPI: thermal: Drop nocrt parameter 2023-09-02 09:16:18 +02:00
tiny-power-button.c
utils.c
video_detect.c ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100 2023-11-20 11:51:53 +01:00
viot.c ACPI: VIOT: Initialize the correct IOMMU fwspec 2023-05-11 23:03:12 +09:00
wakeup.c