OSDN Git Service

spapr: Fix migration of PCI host bridges from qemu-2.7
authorDavid Gibson <david@gibson.dropbear.id.au>
Mon, 14 Nov 2016 23:08:42 +0000 (10:08 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 14 Nov 2016 23:08:42 +0000 (10:08 +1100)
commit9b54ca0ba781012eeea4237b7c4832ba2ea81d89
treec1f2d7c6dc26934ea9895c556bd113b5c08cffd1
parent0a890b31df6689aefcd5b99641ca8d305a601149
spapr: Fix migration of PCI host bridges from qemu-2.7

daa2369 "spapr_pci: Add a 64-bit MMIO window" subtly broke migration from
qemu-2.7 to the current version.  It split the device's MMIO window into
two pieces for 32-bit and 64-bit MMIO.

The patch included backwards compatibility code to convert the old property
into the new format.  However, the property value was also transferred in
the migration stream and compared with a (probably unwise) VMSTATE_EQUAL.
So, the "raw" value from 2.7 is compared to the new style converted value
from (pre-)2.8 giving a mismatch and migration failure.

Although it would be technically possible to fix this in a way allowing
backwards migration, that would leave an ugly legacy around indefinitely.
This patch takes the simpler approach of bumping the migration version,
dropping the unwise VMSTATE_EQUAL (and some equally unwise ones around it)
and ignoring them on an incoming migration.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru>
hw/ppc/spapr_pci.c