Skip to content

Mitigation of "failed to load cpu:cpreg_vmstate_array_len" migration failures

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

Status from this message: Applied to target-arm.next, thanks (with an edit to the

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest7 patches 6 repliesApplied
  2. v96 patches 9 repliesSuperseded
  3. v86 patches 10 repliesSuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v77 patches1 replySuperseded
v611 patches20 repliesSuperseded
v511 patches2 repliesSuperseded
v410 patches6 repliesSuperseded
v311 patches14 repliesSuperseded
v28 patches4 repliesSuperseded
v1 posting 2/27 patches14 repliesSuperseded
v1 posting 1/26 of 7 patches1 replySuperseded

Changes in v10 from the cover letter

- main functional change consists in the introduction of a new ToleranceOnlySrcTestValue migration tolerance type to handle KVM_REG_ARM_VENDOR_HYP_BMAP_2
- See individual patch diff logs for more details

Patches in v10 Applied

#Subject and filesSizeRepliesApplied
1/7target/arm/cpu: Introduce the infrastructure for cpreg migration tolerancestarget/arm/cpu.c target/arm/cpu.h target/arm/internals.h+137 -01 reply
2/7target/arm/machine: Handle ToleranceNotOnBothEnds migration tolerancestarget/arm/machine.c target/arm/trace-events+17 -60 replies
3/7target/arm/machine: Handle ToleranceOnlySrcTestValue migration tolerancetarget/arm/machine.c+10 -41 reply
4/7target/arm/cpu64: Mitigate migration failures due to spurious TCR_EL1, PIRE0_EL1 and PIR_EL1target/arm/cpu64.c+28 -00 replies
5/7target/arm/cpu64: Define cpreg migration tolerance for KVM_REG_ARM_VENDOR_HYP_BMAP_2target/arm/cpu64.c+11 -01 reply
6/7target/arm/helper: Define cpreg migration tolerance for DGBDTR_EL0target/arm/helper.c+15 -01 reply
7/7Revert "target/arm: Reinstate bogus AArch32 DBGDTRTX register for migration compat"target/arm/debug_helper.c+0 -290 replies

Reviews trailers per patch

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

PatchPeter MaydellSebastian Ott
1/7R-b
2/7R-b
3/7R-b
4/7R-b R-b
5/7R-b
6/7R-b R-b
7/7R-b R-b

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

Read the v10 thread

Cover letter [PATCH v10 0/7] Mitigation of "failed to load cpu:cpreg_vmstate_array_len" migration failures

This series introduces an infrastructure to explicitly tolerate some mismatches between cpu cpreg indexes/values on migration.

We especially handle failures due to an attempt to migrate more registers than exposed on the destination.

Once the infrastructure is in place we can handle the following known issues:
KVM:
- removal of unconditionnal exposure of TCR2_EL1, PIRE0_EL1, PIR_EL1 from v6.13 onwards. Causes forward migration failure.
- unconditionnal exposure of KVM_REG_ARM_VENDOR_HYP_BMAP_2 FW pseudo register from v6.16 onwards. Causes backward migration failure.
TCG:
- We can eventually remove AArch32 DBGDTRTX register which was erroneously defined.

The series can be found at:
https://github.com/eauger/qemu/tree/x-kernel-mig-v10

History:
v9 -> v10:
- main functional change consists in the introduction of a new ToleranceOnlySrcTestValue migration tolerance type to handle KVM_REG_ARM_VENDOR_HYP_BMAP_2
- See individual patch diff logs for more details

v8 -> v9:
- took into account Seb's comments (fixed ->type check, rename one function)
- collected R-bs

v7 -> v8:
- rebase on top of v3 dep
- removal of target/arm/machine: Fix detection of unknown incoming cpregs which is integrated in prerequisite series

v6 -> v7
- complete rework after Peter's comments in
(https://lore.kernel.org/all/[email protected]/)
Especially it does not use properties at all. Do not feature hidden regs Also the initial series was split into 2.

Eric Auger (7):
target/arm/cpu: Introduce the infrastructure for cpreg migration
tolerances
target/arm/machine: Handle ToleranceNotOnBothEnds migration tolerances target/arm/machine: Handle ToleranceOnlySrcTestValue migration
tolerance
target/arm/cpu64: Mitigate migration failures due to spurious TCR_EL1,
PIRE0_EL1 and PIR_EL1
target/arm/cpu64: Define cpreg migration tolerance for
KVM_REG_ARM_VENDOR_HYP_BMAP_2
target/arm/helper: Define cpreg migration tolerance for DGBDTR_EL0 Revert "target/arm: Reinstate bogus AArch32 DBGDTRTX register for
migration compat"

 target/arm/cpu.h          |  1 +
 target/arm/internals.h    | 54 ++++++++++++++++++++++++++
 target/arm/cpu.c          | 82 +++++++++++++++++++++++++++++++++++++++
 target/arm/cpu64.c        | 39 +++++++++++++++++++
 target/arm/debug_helper.c | 29 --------------
 target/arm/helper.c       | 15 +++++++
 target/arm/machine.c      | 33 +++++++++++-----
 target/arm/trace-events   |  2 +
 8 files changed, 217 insertions(+), 38 deletions(-)
Signature · 1 line
2.53.0