xref: /openbmc/linux/arch/arm64/include/asm/kvm_ras.h (revision 0b12620f)
10db5e022SJames Morse /* SPDX-License-Identifier: GPL-2.0 */
20db5e022SJames Morse /* Copyright (C) 2018 - Arm Ltd */
30db5e022SJames Morse 
40db5e022SJames Morse #ifndef __ARM64_KVM_RAS_H__
50db5e022SJames Morse #define __ARM64_KVM_RAS_H__
60db5e022SJames Morse 
7d44f1b8dSJames Morse #include <linux/acpi.h>
8d44f1b8dSJames Morse #include <linux/errno.h>
90db5e022SJames Morse #include <linux/types.h>
100db5e022SJames Morse 
11d44f1b8dSJames Morse #include <asm/acpi.h>
12d44f1b8dSJames Morse 
13d44f1b8dSJames Morse /*
14d44f1b8dSJames Morse  * Was this synchronous external abort a RAS notification?
15d44f1b8dSJames Morse  * Returns '0' for errors handled by some RAS subsystem, or -ENOENT.
16d44f1b8dSJames Morse  */
kvm_handle_guest_sea(phys_addr_t addr,u64 esr)17*0b12620fSAlexandru Elisei static inline int kvm_handle_guest_sea(phys_addr_t addr, u64 esr)
18d44f1b8dSJames Morse {
19d44f1b8dSJames Morse 	/* apei_claim_sea(NULL) expects to mask interrupts itself */
20d44f1b8dSJames Morse 	lockdep_assert_irqs_enabled();
21d44f1b8dSJames Morse 
22d44f1b8dSJames Morse 	return apei_claim_sea(NULL);
23d44f1b8dSJames Morse }
240db5e022SJames Morse 
250db5e022SJames Morse #endif /* __ARM64_KVM_RAS_H__ */
26