Re: [PATCH v3 7/8] arm64: exception: handle asynchronous SError interrupt

2017-04-18 Thread Xiongfeng Wang
Hi James, Thanks for your reply. On 2017/4/18 18:51, James Morse wrote: > Hi Wang Xiongfeng, > > On 18/04/17 02:09, Xiongfeng Wang wrote: >> I have some confusion about the RAS feature when VHE is enabled. Does RAS >> spec support >> the situation when VHE is enabled. When VHE is disabled, the

[PATCH V15 11/11] arm/arm64: KVM: add guest SEA support

2017-04-18 Thread Tyler Baicar
Currently external aborts are unsupported by the guest abort handling. Add handling for SEAs so that the host kernel reports SEAs which occur in the guest kernel. When an SEA occurs in the guest kernel, the guest exits and is routed to kvm_handle_guest_abort(). Prior to this patch, a print

[PATCH V15 06/11] acpi: apei: handle SEA notification type for ARMv8

2017-04-18 Thread Tyler Baicar
ARM APEI extension proposal added SEA (Synchronous External Abort) notification type for ARMv8. Add a new GHES error source handling function for SEA. If an error source's notification type is SEA, then this function can be registered into the SEA exception handler. That way GHES will parse and

[PATCH V15 09/11] ras: acpi / apei: generate trace event for unrecognized CPER section

2017-04-18 Thread Tyler Baicar
UEFI spec allows for non-standard section in Common Platform Error Record. This is defined in section N.2.3 of UEFI version 2.5. Currently if the CPER section's type (UUID) does not match with any section type that the kernel knows how to parse, trace event is not generated for such section. And

[PATCH V15 10/11] trace, ras: add ARM processor error trace event

2017-04-18 Thread Tyler Baicar
Currently there are trace events for the various RAS errors with the exception of ARM processor type errors. Add a new trace event for such errors so that the user will know when they occur. These trace events are consistent with the ARM processor error section type defined in UEFI 2.6 spec

[PATCH V15 08/11] efi: print unrecognized CPER section

2017-04-18 Thread Tyler Baicar
UEFI spec allows for non-standard section in Common Platform Error Record. This is defined in section N.2.3 of UEFI version 2.5. Currently if the CPER section's type (UUID) does not match with one of the section types that the kernel knows how to parse, the section is skipped. Therefore, user is

[PATCH V15 07/11] acpi: apei: panic OS with fatal error status block

2017-04-18 Thread Tyler Baicar
From: "Jonathan (Zhixiong) Zhang" Even if an error status block's severity is fatal, the kernel does not honor the severity level and panic. With the firmware first model, the platform could inform the OS about a fatal hardware error through the non-NMI GHES notification

[PATCH V15 03/11] cper: add timestamp print to CPER status printing

2017-04-18 Thread Tyler Baicar
The ACPI 6.1 spec added a timestamp to the HEST generic data structure. Print the timestamp out when printing out the error status information. Signed-off-by: Tyler Baicar CC: Jonathan (Zhixiong) Zhang Reviewed-by: James Morse

[PATCH V15 05/11] arm64: exception: handle Synchronous External Abort

2017-04-18 Thread Tyler Baicar
SEA exceptions are often caused by an uncorrected hardware error, and are handled when data abort and instruction abort exception classes have specific values for their Fault Status Code. When SEA occurs, before killing the process, report the error in the kernel logs. Update fault_info[] with

[PATCH V15 02/11] ras: acpi/apei: cper: add support for generic data v3 structure

2017-04-18 Thread Tyler Baicar
The ACPI 6.1 spec adds a new version of the generic data structure. Add support to handle the new structure as well as properly verify and iterate through the generic data entries. Signed-off-by: Tyler Baicar CC: Jonathan (Zhixiong) Zhang

[PATCH V15 04/11] efi: parse ARM processor error

2017-04-18 Thread Tyler Baicar
Add support for ARM Common Platform Error Record (CPER). UEFI 2.6 specification adds support for ARM specific processor error information to be reported as part of the CPER records. This provides more detail on for processor error logs. Signed-off-by: Tyler Baicar CC:

[PATCH V15 01/11] acpi: apei: read ack upon ghes record consumption

2017-04-18 Thread Tyler Baicar
A RAS (Reliability, Availability, Serviceability) controller may be a separate processor running in parallel with OS execution, and may generate error records for consumption by the OS. If the RAS controller produces multiple error records, then they may be overwritten before the OS has consumed

[PATCH V15 00/11] Add UEFI 2.6 and ACPI 6.1 updates for RAS on ARM64

2017-04-18 Thread Tyler Baicar
When a memory error, CPU error, PCIe error, or other type of hardware error that's covered by RAS occurs, firmware should populate the shared GHES memory location with the proper GHES structures to notify the OS of the error. For example, platforms that implement firmware first handling may

[PATCH] KVM: arm/arm64: fix races in kvm_psci_vcpu_on

2017-04-18 Thread Andrew Jones
Fix potential races in kvm_psci_vcpu_on() by taking the kvm->lock mutex. In general, it's a bad idea to allow more than one PSCI_CPU_ON to process the same target VCPU at the same time. One such problem that may arise is that one PSCI_CPU_ON could be resetting the target vcpu, which fills the

[PATCH] KVM: arm/arm64: fix races in psci emulation

2017-04-18 Thread Andrew Jones
This patch is another approach to fixing what the last two patches in the "KVM: arm/arm64: race fixes and vcpu requests" series were aiming to fix. This approach doesn't have any dependency on VCPU requests, so it's split out now. Tested by me on ThunderX and Mustang with kvm-unit-tests and the

Re: [PATCH v3 7/8] arm64: exception: handle asynchronous SError interrupt

2017-04-18 Thread James Morse
Hi Wang Xiongfeng, On 18/04/17 02:09, Xiongfeng Wang wrote: > I have some confusion about the RAS feature when VHE is enabled. Does RAS > spec support > the situation when VHE is enabled. When VHE is disabled, the hyperviosr > delegates the error > exception to EL1 by setting HCR_EL2.VSE to 1,

Re: kvm/arm64: use-after-free in kvm_unmap_hva_handler/unmap_stage2_pmds

2017-04-18 Thread Suzuki K Poulose
On 18/04/17 10:08, Mark Rutland wrote: On Tue, Apr 18, 2017 at 09:32:31AM +0100, Mark Rutland wrote: Hi Suzuki, On Thu, Apr 13, 2017 at 04:50:46PM +0100, Suzuki K. Poulose wrote: kvm: Hold reference to the user address space The core KVM code, uses mmgrab/mmdrop to pin the mm struct of the

Re: kvm/arm64: use-after-free in kvm_unmap_hva_handler/unmap_stage2_pmds

2017-04-18 Thread Mark Rutland
On Tue, Apr 18, 2017 at 09:32:31AM +0100, Mark Rutland wrote: > Hi Suzuki, > > On Thu, Apr 13, 2017 at 04:50:46PM +0100, Suzuki K. Poulose wrote: > > kvm: Hold reference to the user address space > > > > The core KVM code, uses mmgrab/mmdrop to pin the mm struct of the user > > application.

Re: kvm/arm64: use-after-free in kvm_unmap_hva_handler/unmap_stage2_pmds

2017-04-18 Thread Mark Rutland
Hi Suzuki, On Thu, Apr 13, 2017 at 04:50:46PM +0100, Suzuki K. Poulose wrote: > kvm: Hold reference to the user address space > > The core KVM code, uses mmgrab/mmdrop to pin the mm struct of the user > application. mmgrab only guarantees that the mm struct is available, > while the "real