[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 13/35] libxl_dm: Update libxl__spawn_stub_dm to use libxl__domain_unpause
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_dm.c | 22 +++++++++++++++++++++- tools/libxl/libxl_internal.h | 1 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 246c570121d3..c00356a2f16a 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -2082,6 +2082,9 @@ static void spawn_stub_launch_dm(libxl__egc *egc, static void stubdom_pvqemu_cb(libxl__egc *egc, libxl__multidev *aodevs, int rc); +static void stubdom_pvqemu_unpaused(libxl__egc *egc, + libxl__dm_resume_state *dmrs, + int rc); static void stubdom_xswait_cb(libxl__egc *egc, libxl__xswait_state *xswait, int rc, const char *p); @@ -2404,7 +2407,24 @@ static void stubdom_pvqemu_cb(libxl__egc *egc, goto out; } - rc = libxl__domain_unpause_deprecated(gc, dm_domid); + sdss->pvqemu.dmrs.ao = ao; + sdss->pvqemu.dmrs.domid = dm_domid; + sdss->pvqemu.dmrs.callback = stubdom_pvqemu_unpaused; + libxl__domain_unpause(egc, &sdss->pvqemu.dmrs); /* must be last */ + return; +out: + stubdom_pvqemu_unpaused(egc, &sdss->pvqemu.dmrs, rc); +} + +static void stubdom_pvqemu_unpaused(libxl__egc *egc, + libxl__dm_resume_state *dmrs, + int rc) +{ + libxl__stub_dm_spawn_state *sdss = + CONTAINER_OF(dmrs, *sdss, pvqemu.dmrs); + STATE_AO_GC(sdss->dm.spawn.ao); + uint32_t dm_domid = sdss->pvqemu.guest_domid; + if (rc) goto out; sdss->xswait.ao = ao; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index a0cb6d28858f..1144aaa3a569 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -3985,6 +3985,7 @@ struct libxl__dm_spawn_state { libxl__spawn_state spawn; libxl__ev_qmp qmp; libxl__ev_time timeout; + libxl__dm_resume_state dmrs; /* filled in by user, must remain valid: */ uint32_t guest_domid; /* domain being served */ libxl_domain_config *guest_config; -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |