softmmu/memory_mapping: factor out adding physical memory ranges
[qemu/kevin.git] / include / migration / snapshot.h
blobe72083b117a65addeb0092a9e3085e23db344993
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"
20 /**
21 * save_snapshot: Save an internal snapshot.
22 * @name: name of internal snapshot
23 * @overwrite: replace existing snapshot with @name
24 * @vmstate: blockdev node name to store VM state in
25 * @has_devices: whether to use explicit device list
26 * @devices: explicit device list to snapshot
27 * @errp: pointer to error object
28 * On success, return %true.
29 * On failure, store an error through @errp and return %false.
31 bool save_snapshot(const char *name, bool overwrite,
32 const char *vmstate,
33 bool has_devices, strList *devices,
34 Error **errp);
36 /**
37 * load_snapshot: Load an internal snapshot.
38 * @name: name of internal snapshot
39 * @vmstate: blockdev node name to load VM state from
40 * @has_devices: whether to use explicit device list
41 * @devices: explicit device list to snapshot
42 * @errp: pointer to error object
43 * On success, return %true.
44 * On failure, store an error through @errp and return %false.
46 bool load_snapshot(const char *name,
47 const char *vmstate,
48 bool has_devices, strList *devices,
49 Error **errp);
51 /**
52 * delete_snapshot: Delete a snapshot.
53 * @name: path to snapshot
54 * @has_devices: whether to use explicit device list
55 * @devices: explicit device list to snapshot
56 * @errp: pointer to error object
57 * On success, return %true.
58 * On failure, store an error through @errp and return %false.
60 bool delete_snapshot(const char *name,
61 bool has_devices, strList *devices,
62 Error **errp);
64 #endif