Skip to content

target/arm: Improvement on memory error handling

Gavin Shan qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4acpi/ghes: Make ghes_record_cper_errors() statichw/acpi/ghes.c include/hw/acpi/ghes.h+2 -61 reply
2/4acpi/ghes: Use error_report() in ghes_record_cper_errors()hw/acpi/ghes.c+16 -210 replies
3/4acpi/ghes: Allow retry to write CPER errorshw/acpi/ghes-stub.c hw/acpi/ghes.c include/hw/acpi/ghes.h +1 more+14 -60 replies
4/4target/arm: Retry pushing CPER error if necessarytarget/arm/kvm.c+25 -67 replies

Reviews trailers per patch

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

PatchPhilippe Mathieu-Daudé
1/4R-b
2/4
3/4
4/4

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

Read the v1 thread

Cover letter [PATCH 0/4] target/arm: Improvement on memory error handling

Currently, there is only one CPER buffer (entry), meaning only one memory error can be reported. In extreme case, multiple memory errors can be raised on different vCPUs. For example, a singile memory error on a 64KB page of the host can results in 16 memory errors to 4KB pages of the guest. Unfortunately, the virtual machine is simply aborted by multiple concurrent memory errors, as the following call trace shows. A SEA exception is injected to the guest so that the CPER buffer can be claimed if the error is successfully pushed by acpi_ghes_memory_errors(), Otherwise, abort() is triggered to crash the virtual machine.

kvm_vcpu_thread_fn
kvm_cpu_exec
kvm_arch_on_sigbus_vcpu
kvm_cpu_synchronize_state
acpi_ghes_memory_errors (a)
kvm_inject_arm_sea | abort

It's arguably to crash the virtual machine in this case. The better behaviour would be to retry on pushing the memory errors, to keep the virtual machine alive so that the administrator has chance to chime in, for example to dump the important data with luck. This series adds one more parameter to acpi_ghes_memory_errors() so that it will be tried to push the memory error until it succeeds.

Gavin Shan (4):
acpi/ghes: Make ghes_record_cper_errors() static acpi/ghes: Use error_report() in ghes_record_cper_errors() acpi/ghes: Allow retry to write CPER errors target/arm: Retry pushing CPER error if necessary

 hw/acpi/ghes-stub.c    |  3 ++-
 hw/acpi/ghes.c         | 45 +++++++++++++++++++++---------------------
 include/hw/acpi/ghes.h |  5 ++---
 target/arm/kvm.c       | 31 +++++++++++++++++++++++------
 4 files changed, 51 insertions(+), 33 deletions(-)
Signature · 1 line
2.48.1