diff options
author | Greg Kurz | 2017-06-14 15:29:10 +0200 |
---|---|---|
committer | David Gibson | 2017-06-30 06:03:31 +0200 |
commit | c95f6161de0b92efbdd64c9ddfdad58843b8760e (patch) | |
tree | 6e78236b531e823151274e827436072359327e04 /include/hw/ppc/spapr.h | |
parent | target/ppc: Fix return value in tcg radix mmu fault handler (diff) | |
download | qemu-c95f6161de0b92efbdd64c9ddfdad58843b8760e.tar.gz qemu-c95f6161de0b92efbdd64c9ddfdad58843b8760e.tar.xz qemu-c95f6161de0b92efbdd64c9ddfdad58843b8760e.zip |
xics: directly register ICPState objects to vmstate
The ICPState objects are currently registered to vmstate as qdev objects.
Their instance ids are hence computed automatically in the migration code,
and thus depends on the order the CPU cores were plugged.
If the destination had its CPU cores plugged in a different order than the
source, then ICPState objects will have different instance_ids and load
the wrong state.
Since CPU objects have a reliable cpu_index which is already used as
instance_id in vmstate, let's use it for ICPState as well.
Please note that this doesn't break migration. Older machine types used to
allocate and realize all ICPState objects at machine init time, for the whole
lifetime of the machine. The qdev instance ids are thus 0,1,2... nr_servers
and happen to map to the vCPU indexes.
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc/spapr.h')
0 files changed, 0 insertions, 0 deletions