spapr/xive: add migration support for KVM
commit277dd3d7712ae056d2614ea164f6560afd5d71d4
authorCédric Le Goater <clg@kaod.org>
Mon, 13 May 2019 08:42:37 +0000 (13 10:42 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 29 May 2019 01:39:46 +0000 (29 11:39 +1000)
tree563f1a3821fe2de8bc0d0edc38f20474e41c9472
parent9b88cd7673dddf9336f50540e5735eb6f190200a
spapr/xive: add migration support for KVM

When the VM is stopped, the VM state handler stabilizes the XIVE IC
and marks the EQ pages dirty. These are then transferred to destination
before the transfer of the device vmstates starts.

The SpaprXive interrupt controller model captures the XIVE internal
tables, EAT and ENDT and the XiveTCTX model does the same for the
thread interrupt context registers.

At restart, the SpaprXive 'post_load' method restores all the XIVE
states. It is called by the sPAPR machine 'post_load' method, when all
XIVE states have been transferred and loaded.

Finally, the source states are restored in the VM change state handler
when the machine reaches the running state.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20190513084245.25755-7-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/intc/spapr_xive.c
hw/intc/spapr_xive_kvm.c
hw/intc/xive.c
hw/ppc/spapr_irq.c
include/hw/ppc/spapr_xive.h
include/hw/ppc/xive.h