Lines Matching refs:dss

83     libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css);  in libxl__colo_save_setup()  local
86 libxl__checkpoint_devices_state *const cds = &dss->cds; in libxl__colo_save_setup()
88 &dss->sws.shs.callbacks.save.a; in libxl__colo_save_setup()
90 STATE_AO_GC(dss->ao); in libxl__colo_save_setup()
92 if (dss->type != LIBXL_DOMAIN_TYPE_HVM) { in libxl__colo_save_setup()
93 LOGD(ERROR, dss->domid, "COLO only supports hvm now"); in libxl__colo_save_setup()
97 css->send_fd = dss->fd; in libxl__colo_save_setup()
98 css->recv_fd = dss->recv_fd; in libxl__colo_save_setup()
105 libxl_defbool_val(dss->remus->userspace_colo_proxy); in libxl__colo_save_setup()
107 if (dss->remus->netbufscript) in libxl__colo_save_setup()
108 css->colo_proxy_script = libxl__strdup(gc, dss->remus->netbufscript); in libxl__colo_save_setup()
116 cds->domid = dss->domid; in libxl__colo_save_setup()
153 libxl__checkpoint_devices_setup(egc, &dss->cds); in libxl__colo_save_setup()
158 dss->callback(egc, dss, ERROR_FAIL); in libxl__colo_save_setup()
166 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_save_setup_done() local
170 libxl__domain_save(egc, dss); in colo_save_setup_done()
174 LOGD(ERROR, dss->domid, "COLO: failed to setup device for guest"); in colo_save_setup_done()
184 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_save_setup_failed() local
193 dss->callback(egc, dss, rc); in colo_save_setup_failed()
206 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in libxl__colo_save_teardown() local
210 LOGD(WARN, dss->domid, in libxl__colo_save_teardown()
217 libxl__qmp_stop_replication(gc, dss->domid, true); in libxl__colo_save_teardown()
221 dss->cds.callback = colo_teardown_done; in libxl__colo_save_teardown()
222 libxl__checkpoint_devices_teardown(egc, &dss->cds); in libxl__colo_save_teardown()
231 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_teardown_done() local
235 dss->callback(egc, dss, rc); in colo_teardown_done()
269 libxl__domain_save_state *dss = sws->dss; in libxl__colo_save_domain_suspend_callback() local
272 libxl__domain_suspend_state *dsps = &dss->dsps; in libxl__colo_save_domain_suspend_callback()
282 libxl__domain_save_state *dss = CONTAINER_OF(dsps, *dss, dsps); in colo_suspend_primary_vm_done() local
287 LOGD(ERROR, dss->domid, "cannot suspend primary vm"); in colo_suspend_primary_vm_done()
292 libxl__checkpoint_devices_state *const cds = &dss->cds; in colo_suspend_primary_vm_done()
299 dss->rc = rc; in colo_suspend_primary_vm_done()
300 libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, !rc); in colo_suspend_primary_vm_done()
308 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_postsuspend_cb() local
313 LOGD(ERROR, dss->domid, "postsuspend fails"); in colo_postsuspend_cb()
332 libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, !rc); in colo_postsuspend_cb()
340 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_read_svm_suspended_done() local
345 LOGD(ERROR, dss->domid, "invalid section: %d, expected: %d", id, in colo_read_svm_suspended_done()
351 libxl__qmp_query_xen_replication_status(gc, dss->domid)) { in colo_read_svm_suspended_done()
352 LOGD(ERROR, dss->domid, in colo_read_svm_suspended_done()
360 libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, ok); in colo_read_svm_suspended_done()
369 libxl__domain_save_state *dss = sws->dss; in libxl__colo_save_domain_checkpoint_callback() local
372 libxl__colo_save_state *const css = &dss->css; in libxl__colo_save_domain_checkpoint_callback()
376 dss->sws.checkpoint_callback = colo_common_write_stream_done; in libxl__colo_save_domain_checkpoint_callback()
377 libxl__stream_write_start_checkpoint(shs->egc, &dss->sws); in libxl__colo_save_domain_checkpoint_callback()
404 libxl__domain_save_state *dss = sws->dss; in libxl__colo_save_domain_resume_callback() local
407 libxl__colo_save_state *const css = &dss->css; in libxl__colo_save_domain_resume_callback()
421 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_read_svm_ready_done() local
426 LOGD(ERROR, dss->domid, "invalid section: %d, expected: %d", id, in colo_read_svm_ready_done()
434 dss->cds.callback = colo_preresume_cb; in colo_read_svm_ready_done()
435 libxl__checkpoint_devices_preresume(egc, &dss->cds); in colo_read_svm_ready_done()
440 libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, 0); in colo_read_svm_ready_done()
448 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_preresume_cb() local
453 LOGD(ERROR, dss->domid, "preresume fails"); in colo_preresume_cb()
458 if (libxl__qmp_start_replication(gc, dss->domid, true)) { in colo_preresume_cb()
459 LOGD(ERROR, dss->domid, "starting replication fails"); in colo_preresume_cb()
466 if (libxl__qmp_colo_do_checkpoint(gc, dss->domid)) { in colo_preresume_cb()
467 LOGD(ERROR, dss->domid, "doing checkpoint fails"); in colo_preresume_cb()
473 if (libxl__domain_resume(gc, dss->domid, /* Fast Suspend */1)) { in colo_preresume_cb()
474 LOGD(ERROR, dss->domid, "cannot resume primary vm"); in colo_preresume_cb()
483 rc = libxl_domain_unpause(CTX, dss->domid); in colo_preresume_cb()
485 LOGD(ERROR, dss->domid, "cannot unpause primary vm"); in colo_preresume_cb()
499 libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, 0); in colo_preresume_cb()
507 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_read_svm_resumed_done() local
512 LOGD(ERROR, dss->domid, "invalid section: %d, expected: %d", id, in colo_read_svm_resumed_done()
522 libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, ok); in colo_read_svm_resumed_done()
539 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_proxy_wait_for_checkpoint() local
541 ASYNC_CALL(egc, dss->cds.ao, &css->child, css, in colo_proxy_wait_for_checkpoint()
569 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_proxy_async_call_done() local
574 LOGD(ERROR, dss->domid, "failed to wait for new checkpoint"); in colo_proxy_async_call_done()
575 colo_start_new_checkpoint(egc, &dss->cds, ERROR_FAIL); in colo_proxy_async_call_done()
579 colo_start_new_checkpoint(egc, &dss->cds, 0); in colo_proxy_async_call_done()
596 libxl__domain_save_state *dss = sws->dss; in libxl__colo_save_domain_wait_checkpoint_callback() local
597 libxl__egc *egc = dss->sws.shs.egc; in libxl__colo_save_domain_wait_checkpoint_callback()
600 libxl__checkpoint_devices_state *const cds = &dss->cds; in libxl__colo_save_domain_wait_checkpoint_callback()
611 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_device_commit_cb() local
616 LOGD(ERROR, dss->domid, "commit fails"); in colo_device_commit_cb()
624 libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, 0); in colo_device_commit_cb()
632 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_start_new_checkpoint() local
640 dss->sws.checkpoint_callback = colo_common_write_stream_done; in colo_start_new_checkpoint()
641 libxl__stream_write_checkpoint_state(egc, &dss->sws, &srcs); in colo_start_new_checkpoint()
646 libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, 0); in colo_start_new_checkpoint()
655 libxl__domain_save_state *dss = CONTAINER_OF(stream, *dss, sws); in colo_common_write_stream_done() local
659 libxl__colo_save_state *const css = &dss->css; in colo_common_write_stream_done()
665 LOGD(ERROR, dss->domid, "sending data fails"); in colo_common_write_stream_done()
681 libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, ok); in colo_common_write_stream_done()
689 libxl__domain_save_state *dss = CONTAINER_OF(css, *dss, css); in colo_common_read_stream_done() local
696 LOGD(ERROR, dss->domid, "reading data fails"); in colo_common_read_stream_done()
713 libxl__xc_domain_saverestore_async_callback_done(egc, &dss->sws.shs, ok); in colo_common_read_stream_done()