18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* Copyright (C) 2018 - Arm Ltd */ 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#ifndef __ARM64_KVM_RAS_H__ 58c2ecf20Sopenharmony_ci#define __ARM64_KVM_RAS_H__ 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <linux/acpi.h> 88c2ecf20Sopenharmony_ci#include <linux/errno.h> 98c2ecf20Sopenharmony_ci#include <linux/types.h> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include <asm/acpi.h> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci/* 148c2ecf20Sopenharmony_ci * Was this synchronous external abort a RAS notification? 158c2ecf20Sopenharmony_ci * Returns '0' for errors handled by some RAS subsystem, or -ENOENT. 168c2ecf20Sopenharmony_ci */ 178c2ecf20Sopenharmony_cistatic inline int kvm_handle_guest_sea(phys_addr_t addr, unsigned int esr) 188c2ecf20Sopenharmony_ci{ 198c2ecf20Sopenharmony_ci /* apei_claim_sea(NULL) expects to mask interrupts itself */ 208c2ecf20Sopenharmony_ci lockdep_assert_irqs_enabled(); 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci return apei_claim_sea(NULL); 238c2ecf20Sopenharmony_ci} 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ci#endif /* __ARM64_KVM_RAS_H__ */ 26