• D
    spapr: Validate capabilities on migration · be85537d
    David Gibson 提交于
    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: NDavid Gibson <david@gibson.dropbear.id.au>
    Reviewed-by: NGreg Kurz <groug@kaod.org>
    be85537d
spapr_caps.c 9.3 KB