2019-01-29 18:48:49 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/* Copyright (C) 2018 - Arm Ltd */
|
|
|
|
|
|
|
|
#ifndef __ARM64_KVM_RAS_H__
|
|
|
|
#define __ARM64_KVM_RAS_H__
|
|
|
|
|
2019-01-29 18:48:50 +00:00
|
|
|
#include <linux/acpi.h>
|
|
|
|
#include <linux/errno.h>
|
2019-01-29 18:48:49 +00:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
2019-01-29 18:48:50 +00:00
|
|
|
#include <asm/acpi.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Was this synchronous external abort a RAS notification?
|
|
|
|
* Returns '0' for errors handled by some RAS subsystem, or -ENOENT.
|
|
|
|
*/
|
|
|
|
static inline int kvm_handle_guest_sea(phys_addr_t addr, unsigned int esr)
|
|
|
|
{
|
|
|
|
/* apei_claim_sea(NULL) expects to mask interrupts itself */
|
|
|
|
lockdep_assert_irqs_enabled();
|
|
|
|
|
|
|
|
return apei_claim_sea(NULL);
|
|
|
|
}
|
2019-01-29 18:48:49 +00:00
|
|
|
|
|
|
|
#endif /* __ARM64_KVM_RAS_H__ */
|