diff options
author | Laurent Vivier | 2017-05-24 14:10:48 +0200 |
---|---|---|
committer | David Gibson | 2017-06-06 00:53:24 +0200 |
commit | 1b6e74824659ef10bd2a2924a98df388b78e175e (patch) | |
tree | 586d5444c2e168b2b5dcd54cde22242b8519db0c /hw/s390x/s390-skeys.c | |
parent | Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-fetch' into st... (diff) | |
download | qemu-1b6e74824659ef10bd2a2924a98df388b78e175e.tar.gz qemu-1b6e74824659ef10bd2a2924a98df388b78e175e.tar.xz qemu-1b6e74824659ef10bd2a2924a98df388b78e175e.zip |
migration: remove register_savevm()
We can replace the four remaining calls of register_savevm() by
calls to register_savevm_live(). So we can remove the function and
as we don't allocate anymore the ops pointer with g_new0()
we don't have to free it then.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/s390x/s390-skeys.c')
-rw-r--r-- | hw/s390x/s390-skeys.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c index 619152cc37..35e7f6316f 100644 --- a/hw/s390x/s390-skeys.c +++ b/hw/s390x/s390-skeys.c @@ -362,6 +362,11 @@ static inline bool s390_skeys_get_migration_enabled(Object *obj, Error **errp) return ss->migration_enabled; } +static SaveVMHandlers savevm_s390_storage_keys = { + .save_state = s390_storage_keys_save, + .load_state = s390_storage_keys_load, +}; + static inline void s390_skeys_set_migration_enabled(Object *obj, bool value, Error **errp) { @@ -375,8 +380,8 @@ static inline void s390_skeys_set_migration_enabled(Object *obj, bool value, ss->migration_enabled = value; if (ss->migration_enabled) { - register_savevm(NULL, TYPE_S390_SKEYS, 0, 1, s390_storage_keys_save, - s390_storage_keys_load, ss); + register_savevm_live(NULL, TYPE_S390_SKEYS, 0, 1, + &savevm_s390_storage_keys, ss); } else { unregister_savevm(DEVICE(ss), TYPE_S390_SKEYS, ss); } |