static int init_dsps(libxl__domain_suspend_state *dsps) { int rc = ERROR_FAIL; libxl_domain_type type; STATE_AO_GC(dsps->ao); libxl__xswait_init(&dsps->pvcontrol); libxl__ev_evtchn_init(&dsps->guest_evtchn); libxl__ev_xswatch_init(&dsps->guest_watch); libxl__ev_time_init(&dsps->guest_timeout); type = libxl__domain_type(gc, dsps->domid); if (type == LIBXL_DOMAIN_TYPE_INVALID) goto out; dsps->type = type; dsps->guest_evtchn.port = -1; dsps->guest_evtchn_lockfd = -1; dsps->guest_responded = 0; dsps->dm_savefile = libxl__device_model_savefile(gc, dsps->domid); /* Secondary vm is not created, so we cannot get evtchn port */ rc = 0; out: return rc; }
void libxl__xswait_init(libxl__xswait_state *xswa) { libxl__ev_time_init(&xswa->time_ev); libxl__ev_xswatch_init(&xswa->watch_ev); }
void libxl__logdirty_init(libxl__logdirty_switch *lds) { lds->cmd_path = 0; libxl__ev_xswatch_init(&lds->watch); libxl__ev_time_init(&lds->timeout); }