spapr_cpu_core: migrate per-CPU data
commitb94020268e0b6659499e250d25346baaa9888fed
authorGreg Kurz <groug@kaod.org>
Mon, 18 Jun 2018 12:26:35 +0000 (18 14:26 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 21 Jun 2018 11:22:53 +0000 (21 21:22 +1000)
tree402776ec607843f717fff8fe23e9e9c21b3cb061
parent04026890f2d71afb36dbef24c370171cd0c42913
spapr_cpu_core: migrate per-CPU data

A per-CPU machine data pointer was recently added to PowerPCCPU. The
motivation is to to hide platform specific details from the core CPU
code. This per-CPU data can hold state which is relevant to the guest
though, eg, Virtual Processor Areas, and we should migrate this state.

This patch adds the plumbing so that we can migrate the per-CPU data
for PAPR guests. We only do this for newer machine types for the sake
of backward compatibility. No state is migrated for the moment: the
vmstate_spapr_cpu_state structure will be populated by subsequent
patches.

Signed-off-by: Greg Kurz <groug@kaod.org>
[dwg: Fix some trivial spelling and spacing errors]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c
hw/ppc/spapr_cpu_core.c
include/hw/ppc/spapr_cpu_core.h