]> git.ipfire.org Git - thirdparty/qemu.git/commit
spapr: Validate capabilities on migration
authorDavid Gibson <david@gibson.dropbear.id.au>
Mon, 11 Dec 2017 04:09:37 +0000 (15:09 +1100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 6 Feb 2018 00:53:31 +0000 (18:53 -0600)
commit804e5ea9ed1ac001ca3e3b5e30843e1073296003
tree4803f4dfda7f5a2059983d248bd4de1b71ecb98d
parent9070f408f491693291f7a7335340acc93d2610a5
spapr: Validate capabilities on migration

Now that the "pseries" machine type implements optional capabilities (well,
one so far) there's the possibility of having different capabilities
available at either end of a migration.  Although arguably a user error,
it would be nice to catch this situation and fail as gracefully as we can.

This adds code to migrate the capabilities flags.  These aren't pulled
directly into the destination's configuration since what the user has
specified on the destination command line should take precedence.  However,
they are checked against the destination capabilities.

If the source was using a capability which is absent on the destination,
we fail the migration, since that could easily cause a guest crash or other
bad behaviour.  If the source lacked a capability which is present on the
destination we warn, but allow the migration to proceed.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
(cherry picked from commit be85537d654565e35e359a74b46fc08b7956525c)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/ppc/spapr.c
hw/ppc/spapr_caps.c
include/hw/ppc/spapr.h