mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Don't re-walk the page tables if an SEA occurred during the faulting page table walk to avoid taking a fatal exception in the hyp. Additionally, check that FAR_EL2 is valid for SEAs not taken on PTW as the architecture doesn't guarantee it contains the fault VA. Finally, fix up the rest of the abort path by checking for SEAs early and bugging the VM if we get further along with an UNKNOWN fault IPA. Reviewed-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20250402201725.2963645-4-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
25 lines
573 B
C
25 lines
573 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright (C) 2018 - Arm Ltd */
|
|
|
|
#ifndef __ARM64_KVM_RAS_H__
|
|
#define __ARM64_KVM_RAS_H__
|
|
|
|
#include <linux/acpi.h>
|
|
#include <linux/errno.h>
|
|
#include <linux/types.h>
|
|
|
|
#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(void)
|
|
{
|
|
/* apei_claim_sea(NULL) expects to mask interrupts itself */
|
|
lockdep_assert_irqs_enabled();
|
|
|
|
return apei_claim_sea(NULL);
|
|
}
|
|
|
|
#endif /* __ARM64_KVM_RAS_H__ */
|