arm64/KVM: RAS & IESB for firmware first support
Status from this message: Queued for 4.16. Thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest13 patches 22 repliesApplied
- v513 patches 8 repliesSuperseded
- v4 posting 2/29 patches 0 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 posting 1/2 | 21 patches | 58 replies | Superseded | |
| v3 | 20 patches | 16 replies | Superseded | |
| v2 | 16 patches | 11 replies | Superseded | |
| v1 | 9 patches | 1 reply | Superseded |
Patches in v6 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/13 | arm64: cpufeature: __this_cpu_has_cap() shouldn't stop earlyarch/ | +2 | 3 replies | |
| 2/13 | arm64: sysreg: Move to use definitions for all the SCTLR bitsarch/ arch/ arch/ | +67 | 0 replies | |
| 3/13 | arm64: cpufeature: Detect CPU RAS Extentionsarch/ arch/ arch/ +1 more | +33 | 6 replies | |
| 4/13 | arm64: kernel: Survive corrected RAS errors notified by SErrorarch/ arch/ arch/ | +113 | 0 replies | |
| 5/13 | arm64: Unconditionally enable IESB on exception entry/return for firmware-firstarch/ | +9 | 1 reply | |
| 6/13 | arm64: kernel: Prepare for a DISR userarch/ arch/ arch/ +4 more | +44 | 1 reply | |
| 7/13 | KVM: arm/arm64: mask/unmask daif around VHE guestsarch/ arch/ virt/ | +16 | 1 reply | |
| 8/13 | KVM: arm64: Set an impdef ESR for Virtual-SError using VSESR_EL2.arch/ arch/ arch/ +2 more | +24 | 1 reply | |
| 9/13 | KVM: arm64: Save/Restore guest DISR_EL1arch/ arch/ arch/ +1 more | +9 | 0 replies | |
| 10/13 | KVM: arm64: Save ESR_EL2 on guest SErrorarch/ | +6 | 1 reply | |
| 11/13 | KVM: arm64: Handle RAS SErrors from EL1 on guest exitarch/ arch/ arch/ +1 more | +25 | 5 replies | |
| 12/13 | KVM: arm64: Handle RAS SErrors from EL2 on guest exitarch/ arch/ arch/ +2 more | +33 | 2 replies | |
| 13/13 | KVM: arm64: Emulate RAS error registers and set HCR_EL2's TERR & TEAarch/ arch/ arch/ +1 more | +29 | 0 replies |
Reviews trailers per patch
12 of 13 patches have a Reviewed-by or Acked-by.
| Patch | Suzuki K Poulose | Catalin Marinas | Christoffer Dall | Marc Zyngier |
|---|---|---|---|---|
| 1/13 | R-b | A-b | ||
| 2/13 | ||||
| 3/13 | R-b | R-b | ||
| 4/13 | R-b | |||
| 5/13 | A-b | |||
| 6/13 | R-b | R-b | ||
| 7/13 | R-b | A-b | ||
| 8/13 | R-b | R-b | ||
| 9/13 | R-b | R-b | ||
| 10/13 | A-b | |||
| 11/13 | A-b | |||
| 12/13 | R-b | |||
| 13/13 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v6 00/13] arm64/KVM: RAS & IESB for firmware first support
Hello,
The aim of this series is to enable IESB to let us kick any pending RAS errors into firmware to be handled by firmware-first.
v6 is a rebase onto arm64's for-next/core branch to fix the conflicts.
I've picked up the Reviewed-by's from v4 that I missed on patches 7, 9 and 13, (they have the relevant patchwork links). Please call me names if I missed any more! (Dropped on patches 11 & 12 is deliberate due to handle_exit_early())
Not all systems will have firmware support, so these RAS errors will become pending SErrors delivered to the kernel. The first part of the series adds some crude categorization for SErrors into 'fatal' or ignorable. This stops us panic()ing for corrected errors, but we make no attempt to handle the error. Proper kernel-first support will be able to do a much better job here.
The second part of the series provides the same minimal handling for SError that interrupt KVM. KVM is currently unable to handle SErrors during world-switch, unless they occur during a magic single-instruction window, it hyp-panics. I suspect this will be easier to fix once the VHE world-switch is further optimised.
KVMs kvm_inject_vabt() needs updating for v8.2 as now we can specify an ESR, and all-zeros has a RAS meaning.
Until we have kernel-first support, containable RAS errors that interrupt a guest are considered by KVM using the same crude categorization the arch code uses. Fatal errors are treated as an impdef-SError, non-fatal errors are ignored. Again, proper kernel-first support will do better. (uncontained errors from a guest will always cause the host to panic)
Known issues:
* Synchronous external abort SET severity is not yet considered, all synchronous-external-aborts are still considered fatal.
* KVM-Migration: HCR_EL2.VSE and VSESR_EL2 cannot be migrated when the guest has an SError pending. An API using {G,S}ET_EVENTS is on my todo list.
* KVM unmasks SError and IRQ before calling handle_exit_early, we may take interrupts while holding an uncontained ESR... (this is currently an improvement on assuming its an impdef error we can blame on the guest)
* We need to fix this for APEI's SEI or kernel-first RAS, the guest-exit SError handling will need to move to before kvm_arm_vhe_guest_exit(), or at least into a region where SError and IRQ is still masked.
Thanks,
James
Dongjiu Geng (1):
KVM: arm64: Emulate RAS error registers and set HCR_EL2's TERR & TEA
James Morse (11):
arm64: cpufeature: __this_cpu_has_cap() shouldn't stop early
arm64: sysreg: Move to use definitions for all the SCTLR bits
arm64: kernel: Survive corrected RAS errors notified by SError
arm64: Unconditionally enable IESB on exception entry/return for
firmware-first
arm64: kernel: Prepare for a DISR user
KVM: arm/arm64: mask/unmask daif around VHE guests
KVM: arm64: Set an impdef ESR for Virtual-SError using VSESR_EL2.
KVM: arm64: Save/Restore guest DISR_EL1
KVM: arm64: Save ESR_EL2 on guest SError
KVM: arm64: Handle RAS SErrors from EL1 on guest exit
KVM: arm64: Handle RAS SErrors from EL2 on guest exit
Xie XiuQi (1):
arm64: cpufeature: Detect CPU RAS Extentions
arch/arm/include/asm/kvm_host.h | 5 +++ arch/arm64/Kconfig | 16 +++++++ arch/arm64/include/asm/assembler.h | 7 ++++ arch/arm64/include/asm/cpucaps.h | 3 +- arch/arm64/include/asm/esr.h | 20 +++++++++ arch/arm64/include/asm/exception.h | 14 +++++++ arch/arm64/include/asm/kvm_arm.h | 2 + arch/arm64/include/asm/kvm_emulate.h | 17 ++++++++ arch/arm64/include/asm/kvm_host.h | 17 ++++++++ arch/arm64/include/asm/processor.h | 1 + arch/arm64/include/asm/sysreg.h | 81 +++++++++++++++++++++++++++++++++++- arch/arm64/include/asm/traps.h | 54 ++++++++++++++++++++++++ arch/arm64/kernel/asm-offsets.c | 1 + arch/arm64/kernel/cpufeature.c | 26 +++++++++++- arch/arm64/kernel/head.S | 13 ++---- arch/arm64/kernel/traps.c | 51 ++++++++++++++++++++--- arch/arm64/kvm/handle_exit.c | 32 +++++++++++++- arch/arm64/kvm/hyp/entry.S | 13 ++++++ arch/arm64/kvm/hyp/switch.c | 12 ++++-- arch/arm64/kvm/hyp/sysreg-sr.c | 6 +++ arch/arm64/kvm/inject_fault.c | 13 +++++- arch/arm64/kvm/sys_regs.c | 11 +++++ arch/arm64/mm/proc.S | 29 +++---------- virt/kvm/arm/arm.c | 7 ++++ 24 files changed, 402 insertions(+), 49 deletions(-)
Signature · 1 line
2.15.1