Merge branch 'acpi-apei'
* acpi-apei: (29 commits) efi: cper: Fix possible out-of-bounds access ACPI: APEI: Fix possible out-of-bounds access to BERT region MAINTAINERS: Add James Morse to the list of APEI reviewers ACPI / APEI: Add support for the SDEI GHES Notification type firmware: arm_sdei: Add ACPI GHES registration helper ACPI / APEI: Use separate fixmap pages for arm64 NMI-like notifications ACPI / APEI: Only use queued estatus entry during in_nmi_queue_one_entry() ACPI / APEI: Split ghes_read_estatus() to allow a peek at the CPER length ACPI / APEI: Make GHES estatus header validation more user friendly ACPI / APEI: Pass ghes and estatus separately to avoid a later copy ACPI / APEI: Let the notification helper specify the fixmap slot ACPI / APEI: Move locking to the notification helper arm64: KVM/mm: Move SEA handling behind a single 'claim' interface KVM: arm/arm64: Add kvm_ras.h to collect kvm specific RAS plumbing ACPI / APEI: Switch NOTIFY_SEA to use the estatus queue ACPI / APEI: Move NOTIFY_SEA between the estatus-queue and NOTIFY_NMI ACPI / APEI: Don't allow ghes_ack_error() to mask earlier errors ACPI / APEI: Generalise the estatus queue's notify code ACPI / APEI: Don't update struct ghes' flags in read/clear estatus ACPI / APEI: Remove spurious GHES_TO_CLEAR check ...
This commit is contained in:
@@ -27,8 +27,10 @@
|
||||
#include <linux/smp.h>
|
||||
#include <linux/serial_core.h>
|
||||
|
||||
#include <acpi/ghes.h>
|
||||
#include <asm/cputype.h>
|
||||
#include <asm/cpu_ops.h>
|
||||
#include <asm/daifflags.h>
|
||||
#include <asm/pgtable.h>
|
||||
#include <asm/smp_plat.h>
|
||||
|
||||
@@ -256,3 +258,32 @@ pgprot_t __acpi_get_mem_attribute(phys_addr_t addr)
|
||||
return __pgprot(PROT_NORMAL_NC);
|
||||
return __pgprot(PROT_DEVICE_nGnRnE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Claim Synchronous External Aborts as a firmware first notification.
|
||||
*
|
||||
* Used by KVM and the arch do_sea handler.
|
||||
* @regs may be NULL when called from process context.
|
||||
*/
|
||||
int apei_claim_sea(struct pt_regs *regs)
|
||||
{
|
||||
int err = -ENOENT;
|
||||
unsigned long current_flags;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_ACPI_APEI_GHES))
|
||||
return err;
|
||||
|
||||
current_flags = arch_local_save_flags();
|
||||
|
||||
/*
|
||||
* SEA can interrupt SError, mask it and describe this as an NMI so
|
||||
* that APEI defers the handling.
|
||||
*/
|
||||
local_daif_restore(DAIF_ERRCTX);
|
||||
nmi_enter();
|
||||
err = ghes_notify_sea();
|
||||
nmi_exit();
|
||||
local_daif_restore(current_flags);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
Reference in New Issue
Block a user