mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
migration: move global_state.optional out
Put it into MigrationState then we can use the properties to specify whether to enable storing global state. Removing global_state_set_optional() since now we can use HW_COMPAT_2_3 for x86/power, and AccelClass.global_props for Xen. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-6-git-send-email-peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
e5cb7e7677
commit
5272298c48
8 changed files with 29 additions and 11 deletions
|
@ -1976,11 +1976,18 @@ void migrate_fd_connect(MigrationState *s)
|
|||
s->migration_thread_running = true;
|
||||
}
|
||||
|
||||
static Property migration_properties[] = {
|
||||
DEFINE_PROP_BOOL("store-global-state", MigrationState,
|
||||
store_global_state, true),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
};
|
||||
|
||||
static void migration_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
||||
dc->user_creatable = false;
|
||||
dc->props = migration_properties;
|
||||
}
|
||||
|
||||
static void migration_instance_init(Object *obj)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue