On Fri, Sep 18, 2026 at 04:46:54PM +0300, Andrey Drobyshev wrote: > The savevm/loadvm operation doesn't make any sense in any of the CPR > modes. Saving VM state implies saving its RAM entirely, while the whole > point of CPR is avoiding that: in cpr-transfer and cpr-exec modes RAM is > preserved in place and never put into the migration stream (see > migrate_ram_is_ignored() in migration/ram.c). As a result, a snapshot > taken with such a mode set has no RAM in it, and loading a snapshot with > such a mode set fails in the RAM loader. > > Currently nothing stops these operations from firing with a CPR mode > still set, e.g. after an earlier CPR attempt. Reject them early in > migrate_can_snapshot(), which guards 'savevm'/'loadvm' HMP commands as > well as 'snapshot-save'/'snapshot-load' QMP commands. > > Signed-off-by: Andrey Drobyshev <[email protected]>
Reviewed-by: Peter Xu <[email protected]> -- Peter Xu
