master
h 52 lines 1.24 KB
Raw
1 /*
2 * COarse-grain LOck-stepping Virtual Machines for Non-stop Service (COLO)
3 * (a.k.a. Fault Tolerance or Continuous Replication)
4 *
5 * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
6 * Copyright (c) 2016 FUJITSU LIMITED
7 * Copyright (c) 2016 Intel Corporation
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2 or
10 * later. See the COPYING file in the top-level directory.
11 */
12
13 #ifndef QEMU_COLO_H
14 #define QEMU_COLO_H
15
16 #include "qapi/qapi-types-migration.h"
17
18 enum colo_event {
19 COLO_EVENT_NONE,
20 COLO_EVENT_CHECKPOINT,
21 COLO_EVENT_FAILOVER,
22 };
23
24 void migrate_start_colo_process(MigrationState *s);
25 bool migration_in_colo_state(void);
26
27 /* loadvm */
28 bool migration_incoming_in_colo_state(void);
29
30 COLOMode get_colo_mode(void);
31
32 /* failover */
33 void colo_do_failover(void);
34
35 /*
36 * colo_checkpoint_delay_set
37 *
38 * Handles change of x-checkpoint-delay migration parameter, called from
39 * migrate_params_apply() to notify COLO module about the change.
40 */
41 void colo_checkpoint_delay_set(void);
42
43 /*
44 * Starts COLO incoming process. Called from process_incoming_migration_co()
45 * after loading the state.
46 *
47 * Called with BQL locked, may temporary release BQL.
48 */
49 void coroutine_fn colo_incoming_co(void);
50
51 void colo_shutdown(void);
52 #endif