Skip to content

Improve traces on migration failure due to cpreg number mismatch

Eric Auger qemu-arm qemu-devel 3 versions – Applied

Status from this message: Applied to target-arm.next, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest7 patches 1 replyApplied
  2. v27 patches 5 repliesSuperseded
  3. v15 patches 8 repliesSuperseded

Changes in v3 from the cover letter

- clear the vmstate array pointers on post_save()
- improve the print_register_name comment
- Collecting remaining R-b's

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/7vmstate: Introduce VMSTATE_VARRAY_INT32_ALLOCinclude/migration/vmstate.h+10 -00 replies
2/7target/arm/machine: Use VMSTATE_VARRAY_INT32_ALLOC for cpreg arraystarget/arm/helper.c target/arm/kvm.c target/arm/machine.c +2 more+35 -300 replies
3/7target/arm/kvm: Export kvm_print_register_name()target/arm/kvm-stub.c target/arm/kvm.c target/arm/kvm_arm.h+15 -10 replies
4/7target/arm/kvm: Tweak print_register_name() for arm64 system registertarget/arm/kvm.c+1 -10 replies
5/7target/arm/machine: Trace cpreg names which do not match on migrationtarget/arm/machine.c+19 -20 replies
6/7target/arm/machine: Trace all register mismatchestarget/arm/machine.c+10 -20 replies
7/7target/arm/machine: Fix detection of unknown incoming cpregstarget/arm/machine.c+49 -120 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchPeter MaydellPeter Xu
1/7R-b R-b
2/7R-b
3/7R-b
4/7R-b
5/7R-b
6/7R-b
7/7R-b

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/7] Improve traces on migration failure due to cpreg number mismatch

This series comes as a follow-up of discussions held in [PATCH v6 00/11] Mitigation of "failed to load cpu:cpreg_vmstate_array_len" migration failures
(https://lore.kernel.org/all/[email protected]/)

It only covers the improvement of the traces. Actual mitigations are handled in a follow-up series:
Mitigation of "failed to load cpu:cpreg_vmstate_array_len" (v8)

When the number of CPU registers received in an incoming migration stream is bigger than the number of CPU registers seen by the destination we currently get the following error:

"failed to load cpu:cpreg_vmstate_array_len"

This series removes this cryptic message and explicitly outputs which spurious registers cause the failures.

---

Available at:
https://github.com/eauger/qemu/tree/cpreg_vmstate_array_len_traces_v3_mitig_v2

v2 -> v3:
- clear the vmstate array pointers on post_save()
- improve the print_register_name comment
- Collecting remaining R-b's

v1 -> v2:
- Tool all comments from Peter on v1. See individual history logs
- Also added last patch which was previously included in the follow-up mitigation series ([PATCH v7 0/7] Mitigation of "failed to load cpu:cpreg_vmstate_array_len" migration failures) but actually belongs to those functional changes.

Eric Auger (7):
vmstate: Introduce VMSTATE_VARRAY_INT32_ALLOC target/arm/machine: Use VMSTATE_VARRAY_INT32_ALLOC for cpreg arrays target/arm/kvm: Export kvm_print_register_name() target/arm/kvm: Tweak print_register_name() for arm64 system register target/arm/machine: Trace cpreg names which do not match on migration target/arm/machine: Trace all register mismatches target/arm/machine: Fix detection of unknown incoming cpregs

 include/migration/vmstate.h |  10 ++++
 target/arm/kvm_arm.h        |   9 +++
 target/arm/helper.c         |   5 --
 target/arm/kvm-stub.c       |   5 ++
 target/arm/kvm.c            |   9 +--
 target/arm/machine.c        | 115 ++++++++++++++++++++++++++++++------
 target/arm/whpx/whpx-all.c  |   7 ---
 target/arm/trace-events     |   3 +
 8 files changed, 127 insertions(+), 36 deletions(-)
Signature · 1 line
2.53.0