target/ppc, spapr: Move VPA information to machine_data
commit7388efafc27c2f45d22c8edbc14b3154c0381c2e
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 13 Jun 2018 06:22:18 +0000 (13 16:22 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sat, 16 Jun 2018 06:32:50 +0000 (16 16:32 +1000)
tree690c9d5bdea6f3d089a75e63bc2adce5912cdbe2
parent51c047283c567ea27084827c979681f3e28b920e
target/ppc, spapr: Move VPA information to machine_data

CPUPPCState currently contains a number of fields containing the state of
the VPA.  The VPA is a PAPR specific concept covering several guest/host
shared memory areas used to communicate some information with the
hypervisor.

As a PAPR concept this is really machine specific information, although it
is per-cpu, so it doesn't really belong in the core CPU state structure.

There's also other information that's per-cpu, but platform/machine
specific.  So create a (void *)machine_data in PowerPCCPU which can be
used by the machine to locate per-cpu data.  Intialization, lifetime and
cleanup of machine_data is entirely up to the machine type.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Tested-by: Greg Kurz <groug@kaod.org>
hw/ppc/spapr_cpu_core.c
hw/ppc/spapr_hcall.c
include/hw/ppc/spapr_cpu_core.h
target/ppc/cpu.h
target/ppc/kvm.c
target/ppc/translate_init.inc.c