2 * COarse-grain LOck-stepping Virtual Machines for Non-stop Service (COLO)
3 * (a.k.a. Fault Tolerance or Continuous Replication)
5 * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
6 * Copyright (c) 2016 FUJITSU LIMITED
7 * Copyright (c) 2016 Intel Corporation
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.
13 #include "qemu/osdep.h"
14 #include "migration/colo.h"
15 #include "migration/failover.h"
16 #include "qmp-commands.h"
17 #include "qapi/qmp/qerror.h"
19 static QEMUBH
*failover_bh
;
21 static void colo_failover_bh(void *opaque
)
23 qemu_bh_delete(failover_bh
);
25 /* TODO: Do failover work */
28 void failover_request_active(Error
**errp
)
30 failover_bh
= qemu_bh_new(colo_failover_bh
, NULL
);
31 qemu_bh_schedule(failover_bh
);
34 void qmp_x_colo_lost_heartbeat(Error
**errp
)
36 if (get_colo_mode() == COLO_MODE_UNKNOWN
) {
37 error_setg(errp
, QERR_FEATURE_DISABLED
, "colo");
41 failover_request_active(errp
);