Merge tag 'v9.0.0-rc3'
[qemu/ar7.git] / include / migration / snapshot.h
blob9e4dcaaa7510e1aa6738c8c06b74bb60d6b9db1a
1 /*
2 * QEMU snapshots
4 * Copyright (c) 2004-2008 Fabrice Bellard
5 * Copyright (c) 2009-2015 Red Hat Inc
7 * Authors:
8 * Juan Quintela <quintela@redhat.com>
11 * This work is licensed under the terms of the GNU GPL, version 2 or later.
12 * See the COPYING file in the top-level directory.
15 #ifndef QEMU_MIGRATION_SNAPSHOT_H
16 #define QEMU_MIGRATION_SNAPSHOT_H
18 #include "qapi/qapi-builtin-types.h"
19 #include "qapi/qapi-types-run-state.h"
21 /**
22 * save_snapshot: Save an internal snapshot.
23 * @name: name of internal snapshot
24 * @overwrite: replace existing snapshot with @name
25 * @vmstate: blockdev node name to store VM state in
26 * @has_devices: whether to use explicit device list
27 * @devices: explicit device list to snapshot
28 * @errp: pointer to error object
29 * On success, return %true.
30 * On failure, store an error through @errp and return %false.
32 bool save_snapshot(const char *name, bool overwrite,
33 const char *vmstate,
34 bool has_devices, strList *devices,
35 Error **errp);
37 /**
38 * load_snapshot: Load an internal snapshot.
39 * @name: name of internal snapshot
40 * @vmstate: blockdev node name to load VM state from
41 * @has_devices: whether to use explicit device list
42 * @devices: explicit device list to snapshot
43 * @errp: pointer to error object
44 * On success, return %true.
45 * On failure, store an error through @errp and return %false.
47 bool load_snapshot(const char *name,
48 const char *vmstate,
49 bool has_devices, strList *devices,
50 Error **errp);
52 /**
53 * delete_snapshot: Delete a snapshot.
54 * @name: path to snapshot
55 * @has_devices: whether to use explicit device list
56 * @devices: explicit device list to snapshot
57 * @errp: pointer to error object
58 * On success, return %true.
59 * On failure, store an error through @errp and return %false.
61 bool delete_snapshot(const char *name,
62 bool has_devices, strList *devices,
63 Error **errp);
65 /**
66 * load_snapshot_resume: Restore runstate after loading snapshot.
67 * @state: state to restore
69 void load_snapshot_resume(RunState state);
71 #endif