From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au,
imammedo@redhat.com, groug@kaod.org, nikunj@linux.vnet.ibm.com,
pbonzini@redhat.com, Bharata B Rao <bharata@linux.vnet.ibm.com>
Subject: [Qemu-devel] [RFC PATCH v1 0/5] sPAPR: Fix migration when CPUs are removed in random order
Date: Wed, 6 Jul 2016 14:29:16 +0530 [thread overview]
Message-ID: <1467795561-1007-1-git-send-email-bharata@linux.vnet.ibm.com> (raw)
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.
- migration_id is newly introduced and used as instance_id when registering
CPU devices using vmstate_register. migration_id is set by the
target machine code. 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 migration_id for migration as
well as in XICS code.
vmstate registration calls are moved to cpu_common_realizefn and newly
introduced cpu_common_unrealizefn.
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.
Changes in v1
-------------
- Introduced CPUState::migration_id to be used with vmstate_register()
- migration_id is now set by target machine code via
CPUClass::get_migration_id()
- Use of migration is controlled by a property CPUState:use_migration_id.
- Use of SPAPR_COMPAT_2_6 to set use-migration-id property for all CPUs
starting from pseries-2.7 onwards.
- Calling vmstate_[un]register() from cpu_common_[un]realizefn calls.
v0: http://lists.nongnu.org/archive/html/qemu-ppc/2016-07/msg00090.html
Bharata B Rao (5):
cpu,target-ppc: Move cpu_vmstate_[un]register calls to
cpu_common_[un]realize
cpu: Introduce CPUState::migration_id
spapr: Implement CPUClass::get_migration_id() for PowerPC CPUs
xics: Use migration_id instead of cpu_index in XICS code
cpu,spapr: Use migration_id from pseries-2.7 onwards
exec.c | 54 ++++++++++++++++++++++++++++-----------------
hw/intc/xics.c | 12 ++++++----
hw/intc/xics_kvm.c | 11 +++++----
hw/intc/xics_spapr.c | 28 +++++++++++++++++------
hw/ppc/spapr.c | 5 +++++
include/qom/cpu.h | 8 +++++++
qom/cpu.c | 29 ++++++++++++++++++++++++
target-ppc/cpu-qom.h | 2 ++
target-ppc/translate_init.c | 15 +++++++++++++
9 files changed, 127 insertions(+), 37 deletions(-)
--
2.7.4
next reply other threads:[~2016-07-06 8:59 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 8:59 Bharata B Rao [this message]
2016-07-06 8:59 ` [Qemu-devel] [RFC PATCH v1 1/5] cpu, target-ppc: Move cpu_vmstate_[un]register calls to cpu_common_[un]realize Bharata B Rao
2016-07-06 10:57 ` Igor Mammedov
2016-07-06 14:16 ` Bharata B Rao
2016-07-06 14:44 ` Igor Mammedov
2016-07-06 16:52 ` Bharata B Rao
2016-07-07 0:47 ` David Gibson
2016-07-06 8:59 ` [Qemu-devel] [RFC PATCH v1 2/5] cpu: Introduce CPUState::migration_id Bharata B Rao
2016-07-06 11:34 ` Igor Mammedov
2016-07-06 14:18 ` Bharata B Rao
2016-07-06 14:47 ` Igor Mammedov
2016-07-07 0:53 ` David Gibson
2016-07-06 8:59 ` [Qemu-devel] [RFC PATCH v1 3/5] spapr: Implement CPUClass::get_migration_id() for PowerPC CPUs Bharata B Rao
2016-07-06 12:01 ` Igor Mammedov
2016-07-06 14:21 ` Bharata B Rao
2016-07-06 14:37 ` Greg Kurz
2016-07-07 0:57 ` David Gibson
2016-07-07 12:32 ` Greg Kurz
2016-07-07 0:55 ` David Gibson
2016-07-06 14:35 ` Greg Kurz
2016-07-06 16:53 ` Bharata B Rao
2016-07-07 1:00 ` David Gibson
2016-07-07 13:43 ` [Qemu-devel] [Qemu-ppc] " Mark Cave-Ayland
2016-07-06 8:59 ` [Qemu-devel] [RFC PATCH v1 4/5] xics: Use migration_id instead of cpu_index in XICS code Bharata B Rao
2016-07-06 9:08 ` Nikunj A Dadhania
2016-07-06 8:59 ` [Qemu-devel] [RFC PATCH v1 5/5] cpu, spapr: Use migration_id from pseries-2.7 onwards Bharata B Rao
2016-07-06 11:44 ` Igor Mammedov
2016-07-06 11:45 ` Igor Mammedov
2016-07-06 14:24 ` Bharata B Rao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1467795561-1007-1-git-send-email-bharata@linux.vnet.ibm.com \
--to=bharata@linux.vnet.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=imammedo@redhat.com \
--cc=nikunj@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).