This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BACKPORT: KVM: arm/arm64: Add kvm_ras.h to collect kvm specific RAS p…
…lumbing To split up APEIs in_nmi() path, the caller needs to always be in_nmi(). KVM shouldn't have to know about this, pull the RAS plumbing out into a header file. Currently guest synchronous external aborts are claimed as RAS notifications by handle_guest_sea(), which is hidden in the arch codes mm/fault.c. 32bit gets a dummy declaration in system_misc.h. There is going to be more of this in the future if/when the kernel supports the SError-based firmware-first notification mechanism and/or kernel-first notifications for both synchronous external abort and SError. Each of these will come with some Kconfig symbols and a handful of header files. Create a header file for all this. This patch gives handle_guest_sea() a 'kvm_' prefix, and moves the declarations to kvm_ras.h as preparation for a future patch that moves the ACPI-specific RAS code out of mm/fault.c. This patch is needed because Quicksilver firmware-first error handling uses the SDEI notification type for communication between trusted firmware and the OS. This adds needed NMI and SDEI functionality so that the SDEI path in the kernel through APEI acts as an NMI and is properly wired up to the APEI interfaces. Backported from: torvalds/linux@0db5e02 Signed-off-by: James Morse <[email protected]> Reviewed-by: Punit Agrawal <[email protected]> Acked-by: Marc Zyngier <[email protected]> Tested-by: Tyler Baicar <[email protected]> Acked-by: Catalin Marinas <[email protected]> Signed-off-by: Tyler Baicar <[email protected]>
- Loading branch information
1 parent
7e0c9ae
commit f78e808
Showing
6 changed files
with
28 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* Copyright (C) 2018 - Arm Ltd */ | ||
|
||
#ifndef __ARM_KVM_RAS_H__ | ||
#define __ARM_KVM_RAS_H__ | ||
|
||
#include <linux/types.h> | ||
|
||
static inline int kvm_handle_guest_sea(phys_addr_t addr, unsigned int esr) | ||
{ | ||
return -1; | ||
} | ||
|
||
#endif /* __ARM_KVM_RAS_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
/* Copyright (C) 2018 - Arm Ltd */ | ||
|
||
#ifndef __ARM64_KVM_RAS_H__ | ||
#define __ARM64_KVM_RAS_H__ | ||
|
||
#include <linux/types.h> | ||
|
||
int kvm_handle_guest_sea(phys_addr_t addr, unsigned int esr); | ||
|
||
#endif /* __ARM64_KVM_RAS_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters