[PATCH 0/5] Improve traces on migration failure due to cpreg number mismatch

Eric Auger posted 5 patches 1 month, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260226100232.500781-1-eric.auger@redhat.com
Maintainers: Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Peter Maydell <peter.maydell@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>
There is a newer version of this series
include/migration/vmstate.h | 10 +++++++
target/arm/kvm_arm.h        |  2 ++
target/arm/helper.c         |  5 ----
target/arm/kvm-stub.c       |  6 ++++
target/arm/kvm.c            |  7 +----
target/arm/machine.c        | 57 +++++++++++++++++++++++++++----------
target/arm/trace-events     |  3 ++
7 files changed, 64 insertions(+), 26 deletions(-)
[PATCH 0/5] Improve traces on migration failure due to cpreg number mismatch
Posted by Eric Auger 1 month, 2 weeks ago
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/20260126165445.3033335-1-eric.auger@redhat.com/)

It only covers the improvement of the traces. Actual mitigations
will be handled in a separate series.

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

Eric Auger (5):
  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/machine: Trace cpreg names which do not match on migration
  target/arm/machine: Trace all register mismatches

 include/migration/vmstate.h | 10 +++++++
 target/arm/kvm_arm.h        |  2 ++
 target/arm/helper.c         |  5 ----
 target/arm/kvm-stub.c       |  6 ++++
 target/arm/kvm.c            |  7 +----
 target/arm/machine.c        | 57 +++++++++++++++++++++++++++----------
 target/arm/trace-events     |  3 ++
 7 files changed, 64 insertions(+), 26 deletions(-)

-- 
2.53.0
Re: [PATCH 0/5] Improve traces on migration failure due to cpreg number mismatch
Posted by Eric Auger 1 month, 2 weeks ago
Hi Peter,

On 2/26/26 11:01 AM, Eric Auger wrote:
> 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/20260126165445.3033335-1-eric.auger@redhat.com/)
>
> It only covers the improvement of the traces. Actual mitigations
> will be handled in a separate series.
>
> 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.

Thank you for the diligent review! Hopefully I have taken into account
all your comments in the v2 I've just sent.

Eric
>
> Available at:
> https://github.com/eauger/qemu/tree/cpreg_vmstate_array_len_traces
>
> Eric Auger (5):
>   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/machine: Trace cpreg names which do not match on migration
>   target/arm/machine: Trace all register mismatches
>
>  include/migration/vmstate.h | 10 +++++++
>  target/arm/kvm_arm.h        |  2 ++
>  target/arm/helper.c         |  5 ----
>  target/arm/kvm-stub.c       |  6 ++++
>  target/arm/kvm.c            |  7 +----
>  target/arm/machine.c        | 57 +++++++++++++++++++++++++++----------
>  target/arm/trace-events     |  3 ++
>  7 files changed, 64 insertions(+), 26 deletions(-)
>