qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH v0 0/5] sPAPR: Fix migration when CPUs are removed in random order
@ 2016-07-05  4:42 Bharata B Rao
  2016-07-05  4:42 ` [Qemu-devel] [RFC PATCH v0 1/5] cpu: Factor out cpu vmstate_[un]register into separate routines Bharata B Rao
                   ` (5 more replies)
  0 siblings, 6 replies; 28+ messages in thread
From: Bharata B Rao @ 2016-07-05  4:42 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-ppc, david, imammedo, groug, nikunj, pbonzini, Bharata B Rao

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) 
  
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(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2016-07-07 17:20 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-05  4:42 [Qemu-devel] [RFC PATCH v0 0/5] sPAPR: Fix migration when CPUs are removed in random order Bharata B Rao
2016-07-05  4:42 ` [Qemu-devel] [RFC PATCH v0 1/5] cpu: Factor out cpu vmstate_[un]register into separate routines Bharata B Rao
2016-07-05  4:56   ` David Gibson
2016-07-05  5:16     ` Bharata B Rao
2016-07-05  5:49       ` Igor Mammedov
2016-07-05  6:35         ` Bharata B Rao
2016-07-05  7:22           ` Igor Mammedov
2016-07-05  7:38             ` Bharata B Rao
2016-07-05  8:01               ` Igor Mammedov
2016-07-05  7:29           ` Greg Kurz
2016-07-05  4:42 ` [Qemu-devel] [RFC PATCH v0 2/5] cpu: Optionally use arch_id instead of cpu_index in cpu vmstate_register() Bharata B Rao
2016-07-05  4:56   ` David Gibson
2016-07-05  5:22     ` Bharata B Rao
2016-07-05  6:59   ` Igor Mammedov
2016-07-05  7:15   ` Igor Mammedov
2016-07-05 12:43     ` Bharata B Rao
2016-07-06  5:25       ` Igor Mammedov
2016-07-06  8:25         ` Bharata B Rao
2016-07-07  2:08           ` David Gibson
2016-07-07 17:19         ` Greg Kurz
2016-07-05  7:20   ` Greg Kurz
2016-07-05  4:42 ` [Qemu-devel] [RFC PATCH v0 3/5] spapr: Implement CPUClass.get_arch_id() for PowerPC CPUs Bharata B Rao
2016-07-05  4:58   ` David Gibson
2016-07-05  4:42 ` [Qemu-devel] [RFC PATCH v0 4/5] xics: Use arch_id instead of cpu_index in XICS code Bharata B Rao
2016-07-05  4:59   ` David Gibson
2016-07-05  7:03     ` Igor Mammedov
2016-07-05  4:42 ` [Qemu-devel] [RFC PATCH v0 5/5] spapr: Prefer arch_id over cpu_index Bharata B Rao
2016-07-05  7:10 ` [Qemu-devel] [RFC PATCH v0 0/5] sPAPR: Fix migration when CPUs are removed in random order Greg Kurz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).