Skip to content

KVM: arm64: Account host/guest SError more precisely (Neoverse-N1 #1349291)

James Morse kvmarm linux-arm-kernel 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 0 repliesNew
  2. v26 patches 1 replySuperseded
  3. v16 patches 3 repliesSuperseded

Changes in v3 from the cover letter

* Added isb after the dsb to prevent an early read of ISR_EL1.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6arm64: assembler: Switch ESB-instruction with a vanilla nop if !ARM64_HAS_RASarch/arm64/include/asm/assembler.h+4 -00 replies
2/6KVM: arm64: Abstract the size of the HYP vectors pre-amblearch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/hyp/hyp-entry.S arch/arm64/kvm/va_layout.c+26 -50 replies
3/6KVM: arm64: Make indirect vectors preamble behaviour symmetricarch/arm64/kvm/hyp/hyp-entry.S+3 -30 replies
4/6KVM: arm64: Consume pending SError as early as possiblearch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/hyp/entry.S arch/arm64/kvm/hyp/hyp-entry.S+8 -50 replies
5/6KVM: arm64: Defer guest entry when an asynchronous exception is pendingarch/arm64/kvm/hyp/entry.S+15 -00 replies
6/6arm64: Update silicon-errata.txt for Neoverse-N1 #1349291Documentation/arm64/silicon-errata.txt arch/arm64/kernel/traps.c+5 -00 replies

Reviews trailers per patch

1 of 6 patches has a Reviewed-by or Acked-by.

PatchJulien Thierry
1/6
2/6R-b
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/6] KVM: arm64: Account host/guest SError more precisely (Neoverse-N1 #1349291)

Hello,

This series started as a workaround for Neoverse-N1 #1349291, but has become an improvement in RAS error accounting for KVM on arm64.

Neoverse-N1 affected by #1349291 may report an Uncontained RAS Error as Unrecoverable. [0] This is the difference between killing the thread and killing the machine.
The workaround is to treat all Unrecoverable SError as Uncontained. The arch code's SError handling already does this, due to its nascent kernel-first support.

So only KVM needs some work as it has its own SError handling as we want KVM to handle guest:SError and the host to handle host:SError.

Instead of working around the errata in KVM, we account SError as precisely as we can instead. This means moving the ESB-instruction into the guest-exit vectors, and deferring guest-entry if there is an SError pending. (so that the host's existing handling takes it).

Change since v2:
* Added isb after the dsb to prevent an early read of ISR_EL1.

Changes since v1:
* Squashed v1:patch5 into v2:patch4. v1:patch6 to be posted separately.
* Dropped all the performance numbers.
* Added patch1, making the ESB macro emit a nop if the kconfig feature is disabled.
* Tried to formalise the indirect vectors preamble a little more to make changes easier to review
* Added preamble size checks to the invalid vector entries.
* Pulled the size check out as a macro now there are two invocations.

Thanks,

James

[0] account-required: https://developer.arm.com/docs/sden885747/latest/arm-neoverse-n1-mp050-software-developer-errata-notice

[v1] https://lore.kernel.org/linux-arm-kernel/[email protected]/

James Morse (6):
arm64: assember: Switch ESB-instruction with a vanilla nop if

    !ARM64_HAS_RAS

KVM: arm64: Abstract the size of the HYP vectors pre-amble
KVM: arm64: Make indirect vectors preamble behaviour symmetric
KVM: arm64: Consume pending SError as early as possible
KVM: arm64: Defer guest entry when an asynchronous exception is
pending
arm64: Update silicon-errata.txt for Neoverse-N1 #1349291

 Documentation/arm64/silicon-errata.txt |  1 +
 arch/arm64/include/asm/assembler.h     |  4 ++++
 arch/arm64/include/asm/kvm_asm.h       |  6 ++++++
 arch/arm64/kernel/traps.c              |  4 ++++
 arch/arm64/kvm/hyp/entry.S             | 20 ++++++++++++++---
 arch/arm64/kvm/hyp/hyp-entry.S         | 30 +++++++++++++++++++++-----
 arch/arm64/kvm/va_layout.c             |  7 +++---
 7 files changed, 60 insertions(+), 12 deletions(-)
Signature · 6 lines
2.20.1

_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm