spapr/xive: Fix migration of hot-plugged CPUs
commit310cda5b5e9df642b19a0e9c504368ffba3b3ab9
authorCédric Le Goater <clg@kaod.org>
Tue, 13 Aug 2019 06:48:53 +0000 (13 08:48 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 13 Aug 2019 06:50:30 +0000 (13 16:50 +1000)
tree2796c1925927e411572d4de46831c4c6a8791270
parent25c9780d38d4494f8610371d883865cf40b35dd6
spapr/xive: Fix migration of hot-plugged CPUs

The migration sequence of a guest using the XIVE exploitation mode
relies on the fact that the states of all devices are restored before
the machine is. This is not true for hot-plug devices such as CPUs
which state come after the machine. This breaks migration because the
thread interrupt context registers are not correctly set.

Fix migration of hotplugged CPUs by restoring their context in the
'post_load' handler of the XiveTCTX model.

Fixes: 277dd3d7712a ("spapr/xive: add migration support for KVM")
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20190813064853.29310-1-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/intc/spapr_xive_kvm.c
hw/intc/xive.c
include/hw/ppc/xive.h