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

Eric Auger posted 7 patches 22 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260420140552.104369-1-eric.auger@redhat.com
Maintainers: Peter Maydell <peter.maydell@linaro.org>
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(-)
[PATCH v10 0/7] Mitigation of "failed to load cpu:cpreg_vmstate_array_len" migration failures
Posted by Eric Auger 22 hours ago
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/20260126165445.3033335-1-eric.auger@redhat.com/)
  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(-)

-- 
2.53.0