qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v0 0/5] sPAPR: Fix migration when CPUs are r


From: Greg Kurz
Subject: Re: [Qemu-devel] [RFC PATCH v0 0/5] sPAPR: Fix migration when CPUs are removed in random order
Date: Tue, 5 Jul 2016 09:10:21 +0200

On Tue,  5 Jul 2016 10:12:47 +0530
Bharata B Rao <address@hidden> wrote:

> device_add/del based CPU hotplug and unplug support is upstream for
> sPAPR PowerPC and is under development for x86. Both of these will
> support CPU device removal in random order (and not necessarily in LIFO
> order). Random order removal will result in holes in cpu_index range
> which causes migration to fail. This needs fixes in both generic code
> as well as arch specific code.
> 
> - We need to use arch_id as the instance_id when registering CPU devices
>   using vmstate_register. To support forward migration, as per Igor's
>   suggestion, this needs to be done conditionally based on machine type
>   version.
> - From pseries-2.7 onwards, we start using arch_id for migration as well
>   as in XICS code.
> 
> In fact, Igor even suggested to move the vmstate registration calls
> into cpu_common_realizefn and yet-to-be-introduced cpu_common_unrealizefn.
> But I haven't done that in this patchset as I am hitting an unrelated
> issue with that movement.
> 
> This patchset depends on Greg Kurz's patchset where among other things,
> he is deriving cpu_dt_it (arch_id) based on core-id.
> (https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg00210.html) 
>   

I'm respinning my patchset according to the latest comments I got. This
includes rebasing on top of Eduardo's tree to have the global parse_features
bits, as mentioned here:

https://lists.nongnu.org/archive/html/qemu-devel/2016-07/msg00622.html

I'll rework this patch to apply on the current code:

https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg07564.html

> Tested changes to XICS code with both kernel_irqchip=on/off.
> This applies on ppc-for-2.7 branch of David's tree.
> 
> Bharata B Rao (5):
>   cpu: Factor out cpu vmstate_[un]register into separate routines
>   cpu: Optionally use arch_id instead of cpu_index in cpu
>     vmstate_register()
>   spapr: Implement CPUClass.get_arch_id() for PowerPC CPUs
>   xics: Use arch_id instead of cpu_index in XICS code
>   spapr: Prefer arch_id over cpu_index
> 
>  exec.c                      | 53 
> +++++++++++++++++++++++++++++----------------
>  hw/intc/xics.c              | 14 ++++++++----
>  hw/intc/xics_kvm.c          | 12 +++++-----
>  hw/intc/xics_spapr.c        | 33 ++++++++++++++++++++++------
>  hw/ppc/spapr.c              |  2 ++
>  hw/ppc/spapr_cpu_core.c     |  5 +++++
>  include/hw/boards.h         |  1 +
>  include/qom/cpu.h           |  4 ++++
>  target-ppc/translate_init.c |  8 +++++++
>  9 files changed, 96 insertions(+), 36 deletions(-)
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]