mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
migration/ram: Factor out check for advised postcopy
Let's factor out this check, to be used in virtio-mem context next. While at it, fix a spelling error in a related comment. Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com>S Signed-off-by: David Hildenbrand <david@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
508f7988fd
commit
80fe315c38
3 changed files with 11 additions and 8 deletions
|
@ -2126,6 +2126,13 @@ bool migration_in_incoming_postcopy(void)
|
|||
return ps >= POSTCOPY_INCOMING_DISCARD && ps < POSTCOPY_INCOMING_END;
|
||||
}
|
||||
|
||||
bool migration_incoming_postcopy_advised(void)
|
||||
{
|
||||
PostcopyState ps = postcopy_state_get();
|
||||
|
||||
return ps >= POSTCOPY_INCOMING_ADVISE && ps < POSTCOPY_INCOMING_END;
|
||||
}
|
||||
|
||||
bool migration_in_bg_snapshot(void)
|
||||
{
|
||||
MigrationState *s = migrate_get_current();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue