qemu/hw/ppc
Greg Kurz 7f9fe3f02d spapr_cpu_core: migrate VPA related state
QEMU implements the "Shared Processor LPAR" (SPLPAR) option, which allows
the hypervisor to time-slice a physical processor into multiple virtual
processor. The intent is to allow more guests to run, and to optimize
processor utilization.

The guest OS can cede idle VCPUs, so that their processing capacity may
be used by other VCPUs, with the H_CEDE hcall. The guest OS can also
optimize spinlocks, by confering the time-slice of a spinning VCPU to the
spinlock holder if it's currently notrunning, with the H_CONFER hcall.

Both hcalls depend on a "Virtual Processor Area" (VPA) to be registered
by the guest OS, generally during early boot. Other per-VCPU areas can
be registered: the "SLB Shadow Buffer" which allows a more efficient
dispatching of VCPUs, and the "Dispatch Trace Log Buffer" (DTL) which
is used to compute time stolen by the hypervisor. Both DTL and SLB Shadow
areas depend on the VPA to be registered.

The VPA/SLB Shadow/DTL are state that QEMU should migrate, but this doesn't
happen, for no apparent reason other than it was just never coded. This
causes the features listed above to stop working after migration, and it
breaks the logic of the H_REGISTER_VPA hcall in the destination.

The VPA is set at the guest request, ie, we don't have to migrate
it before the guest has actually set it. This patch hence adds an
"spapr_cpu/vpa" subsection to the recently introduced per-CPU machine
data migration stream.

Since DTL and SLB Shadow are optional and both depend on VPA, they get
their own subsections "spapr_cpu/vpa/slb_shadow" and "spapr_cpu/vpa/dtl"
hanging from the "spapr_cpu/vpa" subsection.

Note that this won't break migration to older QEMUs. Is is already handled
by only registering the vmstate handler for per-CPU data with newer machine
types.

Signed-off-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2018-06-21 21:22:53 +10:00
..
e500-ccsr.h ppc: do not use ../ in include files 2013-03-01 13:57:33 +01:00
e500.c platform-bus-device: use device plug callback instead of machine_done notifier 2018-05-10 18:10:56 +01:00
e500.h platform-bus-device: use device plug callback instead of machine_done notifier 2018-05-10 18:10:56 +01:00
e500plat.c make sure that we aren't overwriting mc->get_hotplug_handler by accident 2018-05-10 18:10:56 +01:00
fdt.c target/ppc: Split page size information into a separate allocation 2018-04-27 18:05:22 +10:00
mac.h mac_newworld: add PMU device 2018-06-16 16:32:33 +10:00
mac_newworld.c mac_newworld: add PMU device 2018-06-16 16:32:33 +10:00
mac_oldworld.c mac_oldworld: move wiring of macio IRQs to macio_oldworld_realize() 2018-04-27 18:05:22 +10:00
Makefile.objs ppc: Add aCube Sam460ex board 2018-03-06 13:16:29 +11:00
mpc8544_guts.c shutdown: Add source information to SHUTDOWN and RESET 2017-05-23 13:28:17 +02:00
mpc8544ds.c ppc: e500: switch E500 based machines to full machine definition 2018-04-27 18:05:23 +10:00
pnv.c ppc/pnv: introduce a new isa_create() operation to the chip model 2018-06-21 21:22:53 +10:00
pnv_bmc.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
pnv_core.c ppc/pnv: introduce a new intc_create() operation to the chip model 2018-06-21 21:22:53 +10:00
pnv_lpc.c ppc/pnv: introduce a new isa_create() operation to the chip model 2018-06-21 21:22:53 +10:00
pnv_occ.c ppc/pnv: Add OCC model stub with interrupt support 2017-04-26 12:00:42 +10:00
pnv_psi.c ppc/pnv: change powernv_ prefix to pnv_ for overall naming consistency 2018-01-10 12:53:00 +11:00
pnv_xscom.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
ppc.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
ppc4xx_devs.c ppc: replace cpu_model with cpu_type on ref405ep,taihu boards 2017-10-17 10:34:00 +11:00
ppc4xx_pci.c pci: Rename root bus initialization functions for clarity 2017-12-05 19:13:45 +02:00
ppc405.h ppc4xx: Export ECB and PLB emulation 2017-09-08 09:30:55 +10:00
ppc405_boards.c hw: Do not include "sysemu/blockdev.h" if it is not necessary 2018-06-01 14:15:10 +02:00
ppc405_uc.c Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
ppc440.h ppc4xx: Add device models found in PPC440 core SoCs 2018-02-16 14:06:07 +11:00
ppc440_bamboo.c Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
ppc440_pcix.c ppc440_pcix: Fix a typo in setting a register (Coverity CID1390577) 2018-06-12 09:33:52 +10:00
ppc440_uc.c ppc: use local path for local headers 2018-06-01 19:20:37 +03:00
ppc_booke.c ppc_booke: drop useless assignment 2017-05-07 09:57:51 +03:00
ppce500_spin.c hw/ppc: QOM'ify ppce500_spin.c 2017-01-31 10:10:13 +11:00
prep.c prep: fix keyboard for the 40p machine 2018-06-12 09:33:52 +10:00
prep_systemio.c prep: add PReP System I/O 2017-01-31 10:10:13 +11:00
rs6000_mc.c prep: add IBM RS/6000 7020 (40p) memory controller 2017-01-31 10:10:13 +11:00
sam460ex.c acpi, vhost, misc: fixes, features 2018-06-04 10:15:16 +01:00
spapr.c spapr_cpu_core: migrate per-CPU data 2018-06-21 21:22:53 +10:00
spapr_caps.c ppc/spapr_caps: Don't disable cap_cfpc on POWER8 by default 2018-06-16 16:32:33 +10:00
spapr_cpu_core.c spapr_cpu_core: migrate VPA related state 2018-06-21 21:22:53 +10:00
spapr_drc.c hw/ppc/spapr_drc: Replace error_setg(&error_abort) by error_report() + abort() 2018-06-12 09:33:52 +10:00
spapr_events.c spapr_events: drop bogus cell from "interrupt-ranges" property 2017-12-15 09:49:24 +11:00
spapr_hcall.c target/ppc, spapr: Move VPA information to machine_data 2018-06-16 16:32:50 +10:00
spapr_iommu.c iommu: Add IOMMU index argument to translate method 2018-06-15 15:23:34 +01:00
spapr_ovec.c Purge uses of banned g_assert_FOO() 2018-06-13 13:47:35 +02:00
spapr_pci.c spapr_pci: Remove unhelpful pagesize warning 2018-06-12 10:44:36 +10:00
spapr_pci_vfio.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
spapr_rng.c spapr_rng: Convert to DEFINE_PROP_LINK 2017-07-14 12:04:43 +02:00
spapr_rtas.c spapr: Clean up handling of LPCR power-saving exit bits 2018-05-04 15:00:37 +10:00
spapr_rtas_ddw.c machine: rename MemoryHotplugState to DeviceMemoryState 2018-05-07 10:00:02 -03:00
spapr_rtc.c qapi: Empty out qapi-schema.json 2018-03-02 13:45:50 -06:00
spapr_vio.c spapr/vio: deprecate the "irq" property 2018-06-12 10:44:35 +10:00
trace-events uninorth: create new uninorth device 2018-05-04 15:00:37 +10:00
virtex_ml507.c hw: Do not include "sysemu/block-backend.h" if it is not necessary 2018-06-01 14:15:10 +02:00