Lines Matching refs:dcs

792                                         libxl__domain_create_state *dcs);
799 libxl__domain_create_state *dcs,
805 libxl__domain_create_state *dcs,
815 libxl__domain_create_state *dcs) in initiate_domain_create() argument
817 STATE_AO_GC(dcs->ao); in initiate_domain_create()
824 libxl_domain_config *const d_config = dcs->guest_config; in initiate_domain_create()
825 libxl__domain_build_state *const state = &dcs->build_state; in initiate_domain_create()
826 const int restore_fd = dcs->restore_fd; in initiate_domain_create()
828 domid = dcs->domid_soft_reset; in initiate_domain_create()
963 dcs->guest_domid = domid; in initiate_domain_create()
968 dcs->guest_domid = domid; in initiate_domain_create()
969 dcs->sdss.dm.guest_domid = 0; /* means we haven't spawned */ in initiate_domain_create()
986 dcs->bl.ao = ao; in initiate_domain_create()
1001 if (restore_fd >= 0 || dcs->domid_soft_reset != INVALID_DOMID) { in initiate_domain_create()
1003 domcreate_bootloader_done(egc, &dcs->bl, 0); in initiate_domain_create()
1006 dcs->bl.callback = domcreate_bootloader_done; in initiate_domain_create()
1007 dcs->bl.console_available = domcreate_bootloader_console_available; in initiate_domain_create()
1008 dcs->bl.info = &d_config->b_info; in initiate_domain_create()
1009 dcs->bl.disk = bootdisk; in initiate_domain_create()
1010 dcs->bl.domid = dcs->guest_domid; in initiate_domain_create()
1012 dcs->bl.kernel = &dcs->build_state.pv_kernel; in initiate_domain_create()
1013 dcs->bl.ramdisk = &dcs->build_state.pv_ramdisk; in initiate_domain_create()
1015 libxl__bootloader_run(egc, &dcs->bl); in initiate_domain_create()
1021 domcreate_complete(egc, dcs, ret); in initiate_domain_create()
1027 libxl__domain_create_state *dcs = CONTAINER_OF(bl, *dcs, bl); in domcreate_bootloader_console_available() local
1029 domcreate_console_available(egc, dcs); in domcreate_bootloader_console_available()
1033 libxl__domain_create_state *dcs) { in domcreate_console_available() argument
1034 libxl__ao_progress_report(egc, dcs->ao, &dcs->aop_console_how, in domcreate_console_available()
1036 dcs->guest_domid, in domcreate_console_available()
1037 dcs->aop_console_how.for_event)); in domcreate_console_available()
1044 libxl__domain_create_state *dcs = CONTAINER_OF(crs, *dcs, crs); in libxl__colo_restore_setup_done() local
1049 LOGD(ERROR, dcs->guest_domid, "colo restore setup fails: %d", rc); in libxl__colo_restore_setup_done()
1050 domcreate_stream_done(egc, &dcs->srs, rc); in libxl__colo_restore_setup_done()
1054 libxl__stream_read_start(egc, &dcs->srs); in libxl__colo_restore_setup_done()
1061 libxl__domain_create_state *dcs = CONTAINER_OF(bl, *dcs, bl); in domcreate_bootloader_done() local
1065 const uint32_t domid = dcs->guest_domid; in domcreate_bootloader_done()
1066 libxl_domain_config *const d_config = dcs->guest_config; in domcreate_bootloader_done()
1067 const int restore_fd = dcs->restore_fd; in domcreate_bootloader_done()
1068 libxl__domain_build_state *const state = &dcs->build_state; in domcreate_bootloader_done()
1069 const int checkpointed_stream = dcs->restore_params.checkpointed_stream; in domcreate_bootloader_done()
1070 libxl__colo_restore_state *const crs = &dcs->crs; in domcreate_bootloader_done()
1073 &dcs->srs.shs.callbacks.restore.a; in domcreate_bootloader_done()
1076 domcreate_rebuild_done(egc, dcs, rc); in domcreate_bootloader_done()
1088 dcs->sdss.dm.spawn.ao = ao; in domcreate_bootloader_done()
1089 dcs->sdss.dm.guest_config = dcs->guest_config; in domcreate_bootloader_done()
1090 dcs->sdss.dm.build_state = &dcs->build_state; in domcreate_bootloader_done()
1091 dcs->sdss.dm.callback = domcreate_devmodel_started; in domcreate_bootloader_done()
1092 dcs->sdss.callback = domcreate_devmodel_started; in domcreate_bootloader_done()
1094 if (restore_fd < 0 && dcs->domid_soft_reset == INVALID_DOMID) { in domcreate_bootloader_done()
1096 domcreate_rebuild_done(egc, dcs, rc); in domcreate_bootloader_done()
1122 dcs->srs.ao = ao; in domcreate_bootloader_done()
1123 dcs->srs.dcs = dcs; in domcreate_bootloader_done()
1124 dcs->srs.fd = restore_fd; in domcreate_bootloader_done()
1125 dcs->srs.legacy = (dcs->restore_params.stream_version == 1); in domcreate_bootloader_done()
1126 dcs->srs.back_channel = false; in domcreate_bootloader_done()
1127 dcs->srs.completion_callback = domcreate_stream_done; in domcreate_bootloader_done()
1135 crs->send_back_fd = dcs->send_back_fd; in domcreate_bootloader_done()
1142 libxl__remus_restore_setup(egc, dcs); in domcreate_bootloader_done()
1145 libxl__stream_read_start(egc, &dcs->srs); in domcreate_bootloader_done()
1151 domcreate_stream_done(egc, &dcs->srs, rc); in domcreate_bootloader_done()
1158 libxl__domain_create_state *dcs = shs->caller_state; in libxl__srm_callout_callback_restore_results() local
1159 STATE_AO_GC(dcs->ao); in libxl__srm_callout_callback_restore_results()
1160 libxl__domain_build_state *const state = &dcs->build_state; in libxl__srm_callout_callback_restore_results()
1171 libxl__domain_create_state *dcs = srs->dcs; in domcreate_stream_done() local
1172 STATE_AO_GC(dcs->ao); in domcreate_stream_done()
1179 const uint32_t domid = dcs->guest_domid; in domcreate_stream_done()
1180 libxl_domain_config *const d_config = dcs->guest_config; in domcreate_stream_done()
1182 libxl__domain_build_state *const state = &dcs->build_state; in domcreate_stream_done()
1183 const int fd = dcs->restore_fd; in domcreate_stream_done()
1250 domcreate_rebuild_done(egc, dcs, ret); in domcreate_stream_done()
1254 libxl__domain_create_state *dcs, in domcreate_rebuild_done() argument
1257 STATE_AO_GC(dcs->ao); in domcreate_rebuild_done()
1260 const uint32_t domid = dcs->guest_domid; in domcreate_rebuild_done()
1261 libxl_domain_config *const d_config = dcs->guest_config; in domcreate_rebuild_done()
1271 libxl__multidev_begin(ao, &dcs->multidev); in domcreate_rebuild_done()
1272 dcs->multidev.callback = domcreate_launch_dm; in domcreate_rebuild_done()
1273 libxl__add_disks(egc, ao, domid, d_config, &dcs->multidev); in domcreate_rebuild_done()
1274 libxl__multidev_prepared(egc, &dcs->multidev, 0); in domcreate_rebuild_done()
1280 domcreate_complete(egc, dcs, ret); in domcreate_rebuild_done()
1286 libxl__domain_create_state *dcs = CONTAINER_OF(multidev, *dcs, multidev); in domcreate_launch_dm() local
1287 STATE_AO_GC(dcs->ao); in domcreate_launch_dm()
1291 const uint32_t domid = dcs->guest_domid; in domcreate_launch_dm()
1292 libxl_domain_config *const d_config = dcs->guest_config; in domcreate_launch_dm()
1293 libxl__domain_build_state *const state = &dcs->build_state; in domcreate_launch_dm()
1393 dcs->sdss.dm.guest_domid = domid; in domcreate_launch_dm()
1395 libxl__spawn_stub_dm(egc, &dcs->sdss); in domcreate_launch_dm()
1397 libxl__spawn_local_dm(egc, &dcs->sdss.dm); in domcreate_launch_dm()
1438 dcs->sdss.dm.guest_domid = domid; in domcreate_launch_dm()
1439 libxl__spawn_local_dm(egc, &dcs->sdss.dm); in domcreate_launch_dm()
1442 assert(!dcs->sdss.dm.guest_domid); in domcreate_launch_dm()
1443 domcreate_devmodel_started(egc, &dcs->sdss.dm, 0); in domcreate_launch_dm()
1455 domcreate_complete(egc, dcs, ret); in domcreate_launch_dm()
1505 libxl__domain_create_state *dcs = CONTAINER_OF(multidev, *dcs, multidev); in domcreate_attach_devices() local
1506 STATE_AO_GC(dcs->ao); in domcreate_attach_devices()
1507 int domid = dcs->guest_domid; in domcreate_attach_devices()
1508 libxl_domain_config *const d_config = dcs->guest_config; in domcreate_attach_devices()
1513 device_type_tbl[dcs->device_type_idx]->type); in domcreate_attach_devices()
1517 dcs->device_type_idx++; in domcreate_attach_devices()
1518 dt = device_type_tbl[dcs->device_type_idx]; in domcreate_attach_devices()
1522 libxl__multidev_begin(ao, &dcs->multidev); in domcreate_attach_devices()
1523 dcs->multidev.callback = domcreate_attach_devices; in domcreate_attach_devices()
1524 dt->add(egc, ao, domid, d_config, &dcs->multidev); in domcreate_attach_devices()
1525 libxl__multidev_prepared(egc, &dcs->multidev, 0); in domcreate_attach_devices()
1529 domcreate_attach_devices(egc, &dcs->multidev, 0); in domcreate_attach_devices()
1533 domcreate_console_available(egc, dcs); in domcreate_attach_devices()
1535 domcreate_complete(egc, dcs, 0); in domcreate_attach_devices()
1541 domcreate_complete(egc, dcs, ret); in domcreate_attach_devices()
1548 libxl__domain_create_state *dcs = CONTAINER_OF(dmss, *dcs, sdss.dm); in domcreate_devmodel_started() local
1550 int domid = dcs->guest_domid; in domcreate_devmodel_started()
1553 libxl_domain_config *const d_config = dcs->guest_config; in domcreate_devmodel_started()
1560 if (dcs->sdss.dm.guest_domid) { in domcreate_devmodel_started()
1567 dcs->device_type_idx = -1; in domcreate_devmodel_started()
1568 domcreate_attach_devices(egc, &dcs->multidev, 0); in domcreate_devmodel_started()
1573 domcreate_complete(egc, dcs, ret); in domcreate_devmodel_started()
1577 libxl__domain_create_state *dcs, in domcreate_complete() argument
1580 STATE_AO_GC(dcs->ao); in domcreate_complete()
1581 libxl_domain_config *const d_config = dcs->guest_config; in domcreate_complete()
1582 libxl_domain_config *d_config_saved = &dcs->guest_config_saved; in domcreate_complete()
1584 libxl__file_reference_unmap(&dcs->build_state.pv_kernel); in domcreate_complete()
1585 libxl__file_reference_unmap(&dcs->build_state.pv_ramdisk); in domcreate_complete()
1588 rc = xc_flask_relabel_domain(CTX->xch, dcs->guest_domid, d_config->b_info.exec_ssidref); in domcreate_complete()
1598 lock = libxl__lock_domain_userdata(gc, dcs->guest_domid); in domcreate_complete()
1604 (gc, dcs->guest_domid, d_config_saved); in domcreate_complete()
1614 if (dcs->guest_domid > 0) { in domcreate_complete()
1615 dcs->dds.ao = ao; in domcreate_complete()
1616 dcs->dds.domid = dcs->guest_domid; in domcreate_complete()
1617 dcs->dds.callback = domcreate_destruction_cb; in domcreate_complete()
1618 libxl__domain_destroy(egc, &dcs->dds); in domcreate_complete()
1621 dcs->guest_domid = -1; in domcreate_complete()
1623 dcs->callback(egc, dcs, rc, dcs->guest_domid); in domcreate_complete()
1631 libxl__domain_create_state *dcs = CONTAINER_OF(dds, *dcs, dds); in domcreate_destruction_cb() local
1636 dcs->callback(egc, dcs, ERROR_FAIL, dcs->guest_domid); in domcreate_destruction_cb()
1642 libxl__domain_create_state dcs; member
1655 libxl__domain_create_state *dcs,
1669 cdcs->dcs.ao = ao; in do_domain_create()
1670 cdcs->dcs.guest_config = d_config; in do_domain_create()
1671 libxl_domain_config_init(&cdcs->dcs.guest_config_saved); in do_domain_create()
1672 libxl_domain_config_copy(ctx, &cdcs->dcs.guest_config_saved, d_config); in do_domain_create()
1673 cdcs->dcs.restore_fd = cdcs->dcs.libxc_fd = restore_fd; in do_domain_create()
1674 cdcs->dcs.send_back_fd = send_back_fd; in do_domain_create()
1676 cdcs->dcs.restore_params = *params; in do_domain_create()
1677 rc = libxl__fd_flags_modify_save(gc, cdcs->dcs.restore_fd, in do_domain_create()
1679 &cdcs->dcs.restore_fdfl); in do_domain_create()
1682 cdcs->dcs.callback = domain_create_cb; in do_domain_create()
1683 cdcs->dcs.domid_soft_reset = INVALID_DOMID; in do_domain_create()
1685 if (cdcs->dcs.restore_params.checkpointed_stream == in do_domain_create()
1687 cdcs->dcs.colo_proxy_script = in do_domain_create()
1688 cdcs->dcs.restore_params.colo_proxy_script; in do_domain_create()
1689 cdcs->dcs.crs.cps.is_userspace_proxy = in do_domain_create()
1690 libxl_defbool_val(cdcs->dcs.restore_params.userspace_colo_proxy); in do_domain_create()
1692 cdcs->dcs.colo_proxy_script = NULL; in do_domain_create()
1693 cdcs->dcs.crs.cps.is_userspace_proxy = false; in do_domain_create()
1696 libxl__ao_progress_gethow(&cdcs->dcs.aop_console_how, aop_console_how); in do_domain_create()
1699 initiate_domain_create(egc, &cdcs->dcs); in do_domain_create()
1722 cdcs->dcs.guest_domid = dds->domid; in domain_soft_reset_cb()
1723 rc = libxl__restore_emulator_xenstore_data(&cdcs->dcs, srs->toolstack_buf, in domain_soft_reset_cb()
1730 if (cdcs->dcs.guest_config->b_info.type == LIBXL_DOMAIN_TYPE_HVM) { in domain_soft_reset_cb()
1741 initiate_domain_create(egc, &cdcs->dcs); in domain_soft_reset_cb()
1745 domcreate_complete(egc, &cdcs->dcs, rc); in domain_soft_reset_cb()
1758 libxl__domain_create_state *dcs; in do_domain_soft_reset() local
1768 dcs = &cdcs->dcs; in do_domain_soft_reset()
1769 state = &dcs->build_state; in do_domain_soft_reset()
1772 srs->cdcs.dcs.ao = ao; in do_domain_soft_reset()
1773 srs->cdcs.dcs.guest_config = d_config; in do_domain_soft_reset()
1774 libxl_domain_config_init(&srs->cdcs.dcs.guest_config_saved); in do_domain_soft_reset()
1775 libxl_domain_config_copy(ctx, &srs->cdcs.dcs.guest_config_saved, in do_domain_soft_reset()
1777 cdcs->dcs.restore_fd = -1; in do_domain_soft_reset()
1778 cdcs->dcs.domid_soft_reset = domid_soft_reset; in do_domain_soft_reset()
1779 cdcs->dcs.callback = domain_create_cb; in do_domain_soft_reset()
1780 libxl__ao_progress_gethow(&srs->cdcs.dcs.aop_console_how, in do_domain_soft_reset()
1842 xs_release_domain(ctx->xsh, cdcs->dcs.domid_soft_reset); in do_domain_soft_reset()
1857 libxl__domain_create_state *dcs, in domain_create_cb() argument
1860 libxl__app_domain_create_state *cdcs = CONTAINER_OF(dcs, *cdcs, dcs); in domain_create_cb()
1862 STATE_AO_GC(cdcs->dcs.ao); in domain_create_cb()
1866 if (dcs->restore_fd > -1) { in domain_create_cb()
1868 dcs->restore_fd, dcs->restore_fdfl); in domain_create_cb()