]> Git Repo - qemu.git/blame - include/migration/register.h
Merge remote-tracking branch 'remotes/aurel/tags/pull-target-sh4-20170718' into staging
[qemu.git] / include / migration / register.h
CommitLineData
f2a8f0a6
JQ
1/*
2 * QEMU migration vmstate registration
3 *
4 * Copyright IBM, Corp. 2008
5 *
6 * Authors:
7 * Anthony Liguori <[email protected]>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
11 *
12 */
13
14#ifndef MIGRATION_REGISTER_H
15#define MIGRATION_REGISTER_H
16
f2a8f0a6
JQ
17typedef struct SaveVMHandlers {
18 /* This runs inside the iothread lock. */
19 SaveStateHandler *save_state;
20
70f794fc 21 void (*save_cleanup)(void *opaque);
f2a8f0a6
JQ
22 int (*save_live_complete_postcopy)(QEMUFile *f, void *opaque);
23 int (*save_live_complete_precopy)(QEMUFile *f, void *opaque);
24
25 /* This runs both outside and inside the iothread lock. */
26 bool (*is_active)(void *opaque);
27
28 /* This runs outside the iothread lock in the migration case, and
29 * within the lock in the savevm case. The callback had better only
30 * use data that is local to the migration thread or protected
31 * by other locks.
32 */
33 int (*save_live_iterate)(QEMUFile *f, void *opaque);
34
35 /* This runs outside the iothread lock! */
9907e842 36 int (*save_setup)(QEMUFile *f, void *opaque);
f2a8f0a6
JQ
37 void (*save_live_pending)(QEMUFile *f, void *opaque,
38 uint64_t threshold_size,
39 uint64_t *non_postcopiable_pending,
40 uint64_t *postcopiable_pending);
41 LoadStateHandler *load_state;
acb5ea86
JQ
42 int (*load_setup)(QEMUFile *f, void *opaque);
43 int (*load_cleanup)(void *opaque);
f2a8f0a6
JQ
44} SaveVMHandlers;
45
46int register_savevm_live(DeviceState *dev,
47 const char *idstr,
48 int instance_id,
49 int version_id,
50 SaveVMHandlers *ops,
51 void *opaque);
52
53void unregister_savevm(DeviceState *dev, const char *idstr, void *opaque);
54
55#endif
This page took 0.043216 seconds and 4 git commands to generate.