[Qemu-devel] [PATCH 0/6] spapr/xics: fix migration of older machine types

Greg Kurz posted 6 patches 6 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/149484833874.20089.4164801378197848306.stgit@bahia.lan
Test checkpatch failed
Test docker passed
Test s390x passed
There is a newer version of this series
hw/intc/xics_spapr.c    |    3 +-
hw/ppc/spapr.c          |   75 ++++++++++++++++++++++++++++++++++++++---------
hw/ppc/spapr_cpu_core.c |   40 ++++++++++++++++---------
include/hw/ppc/spapr.h  |    2 +
include/hw/ppc/xics.h   |    2 +
5 files changed, 90 insertions(+), 32 deletions(-)
[Qemu-devel] [PATCH 0/6] spapr/xics: fix migration of older machine types
Posted by Greg Kurz 6 years, 11 months ago
Recent work on XICS broke migration of older machine types. The target
fails with:

qemu-system-ppc64: Unknown savevm section or instance 'icp/server' 1
qemu-system-ppc64: load of migration failed: Invalid argument

This happens because the current code no longer pre-allocates ICP objects
at machine init time.

This series restore the previous behavior for older machine types (patch 6).
Since the fix adds an error path to cover the case when realization of the
ICP objects fails, the series first does some cleanup on the way errors are
handled (patch 1-5).

I could successfully migrate older machines back and forth with QEMU 2.9:
- pseries-2.9
- pseries-2.9 with hotplugged CPUs
- pseries-2.6 (pre CPU hotplug support)

This series is based on:

https://github.com/dgibson/qemu.git ppc-for-2.10

--
Greg

---

Greg Kurz (6):
      ppc/xics: simplify prototype of xics_spapr_init()
      spapr: fix error path of required kernel-irqchip
      spapr: fix error reporting in xics_system_init()
      spapr: sanitize error handling in spapr_ics_create()
      spapr-cpu-core: release ICP object when realization fails
      spapr: fix migration of ICP objects from/to older QEMU


 hw/intc/xics_spapr.c    |    3 +-
 hw/ppc/spapr.c          |   75 ++++++++++++++++++++++++++++++++++++++---------
 hw/ppc/spapr_cpu_core.c |   40 ++++++++++++++++---------
 include/hw/ppc/spapr.h  |    2 +
 include/hw/ppc/xics.h   |    2 +
 5 files changed, 90 insertions(+), 32 deletions(-)


Re: [Qemu-devel] [PATCH 0/6] spapr/xics: fix migration of older machine types
Posted by no-reply@patchew.org 6 years, 11 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PATCH 0/6] spapr/xics: fix migration of older machine types
Message-id: 149484833874.20089.4164801378197848306.stgit@bahia.lan
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 - [tag update]      patchew/149484833874.20089.4164801378197848306.stgit@bahia.lan -> patchew/149484833874.20089.4164801378197848306.stgit@bahia.lan
Switched to a new branch 'test'
3c3824a spapr: fix migration of ICP objects from/to older QEMU
280164f spapr-cpu-core: release ICP object when realization fails
5bc72eb spapr: sanitize error handling in spapr_ics_create()
fa15d00 spapr: fix error reporting in xics_system_init()
ecbe234 spapr: fix error path of required kernel-irqchip
b7cf73d ppc/xics: simplify prototype of xics_spapr_init()

=== OUTPUT BEGIN ===
Checking PATCH 1/6: ppc/xics: simplify prototype of xics_spapr_init()...
Checking PATCH 2/6: spapr: fix error path of required kernel-irqchip...
Checking PATCH 3/6: spapr: fix error reporting in xics_system_init()...
Checking PATCH 4/6: spapr: sanitize error handling in spapr_ics_create()...
Checking PATCH 5/6: spapr-cpu-core: release ICP object when realization fails...
Checking PATCH 6/6: spapr: fix migration of ICP objects from/to older QEMU...
ERROR: "foo* bar" should be "foo *bar"
#50: FILE: hw/ppc/spapr.c:167:
+            void* obj = &spapr->legacy_icps[i];

total: 1 errors, 0 warnings, 122 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
Re: [Qemu-devel] [PATCH 0/6] spapr/xics: fix migration of older machine types
Posted by Greg Kurz 6 years, 11 months ago
On Mon, 15 May 2017 05:13:34 -0700 (PDT)
no-reply@patchew.org wrote:

> Hi,
> 
> This series seems to have some coding style problems. See output below for
> more information:
> 
> Subject: [Qemu-devel] [PATCH 0/6] spapr/xics: fix migration of older machine types
> Message-id: 149484833874.20089.4164801378197848306.stgit@bahia.lan
> Type: series
> 
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
> 
> BASE=base
> n=1
> total=$(git log --oneline $BASE.. | wc -l)
> failed=0
> 
> git config --local diff.renamelimit 0
> git config --local diff.renames True
> 
> commits="$(git log --format=%H --reverse $BASE..)"
> for c in $commits; do
>     echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
>     if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
>         failed=1
>         echo
>     fi
>     n=$((n+1))
> done
> 
> exit $failed
> === TEST SCRIPT END ===
> 
> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> From https://github.com/patchew-project/qemu
>  - [tag update]      patchew/149484833874.20089.4164801378197848306.stgit@bahia.lan -> patchew/149484833874.20089.4164801378197848306.stgit@bahia.lan
> Switched to a new branch 'test'
> 3c3824a spapr: fix migration of ICP objects from/to older QEMU
> 280164f spapr-cpu-core: release ICP object when realization fails
> 5bc72eb spapr: sanitize error handling in spapr_ics_create()
> fa15d00 spapr: fix error reporting in xics_system_init()
> ecbe234 spapr: fix error path of required kernel-irqchip
> b7cf73d ppc/xics: simplify prototype of xics_spapr_init()
> 
> === OUTPUT BEGIN ===
> Checking PATCH 1/6: ppc/xics: simplify prototype of xics_spapr_init()...
> Checking PATCH 2/6: spapr: fix error path of required kernel-irqchip...
> Checking PATCH 3/6: spapr: fix error reporting in xics_system_init()...
> Checking PATCH 4/6: spapr: sanitize error handling in spapr_ics_create()...
> Checking PATCH 5/6: spapr-cpu-core: release ICP object when realization fails...
> Checking PATCH 6/6: spapr: fix migration of ICP objects from/to older QEMU...
> ERROR: "foo* bar" should be "foo *bar"
> #50: FILE: hw/ppc/spapr.c:167:
> +            void* obj = &spapr->legacy_icps[i];
> 

Oops, I'll fix that.

> total: 1 errors, 0 warnings, 122 lines checked
> 
> Your patch has style problems, please review.  If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
> 
> === OUTPUT END ===
> 
> Test command exited with code: 1
> 
> 
> ---
> Email generated automatically by Patchew [http://patchew.org/].
> Please send your feedback to patchew-devel@freelists.org