[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4/5] libxl: wait for stubdom to be ready
On Fri, Mar 13, 2015 at 10:34:34AM +0000, Wei Liu wrote: > Watch /local/domain/$dm_domid/device-model/$domid/state, wait until > state turns "running" then unpause guest. > > LIBXL_STUBDOM_START_TIMEOUT is the timeout used wait for stubdom to be > ready. My test on a very old machine (Core 2 6400) showed that it might > need more than 20s before the stubdom is ready to serve DomU. > > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> > --- > tools/libxl/libxl_dm.c | 39 ++++++++++++++++++++++++++++++++++++++- > tools/libxl/libxl_internal.h | 2 ++ > 2 files changed, 40 insertions(+), 1 deletion(-) > > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c > index 4a38455..ad2ef41 100644 > --- a/tools/libxl/libxl_dm.c > +++ b/tools/libxl/libxl_dm.c > @@ -984,6 +984,8 @@ static void stubdom_pvqemu_cb(libxl__egc *egc, > static void spawn_stubdom_pvqemu_destroy_cb(libxl__egc *egc, > libxl__destroy_domid_state *dis, > int rc); > +static void stubdom_xswait_cb(libxl__egc *egc, libxl__xswait_state *xswait, > + int rc, const char *p); > > char *libxl__stub_dm_name(libxl__gc *gc, const char *guest_name) > { > @@ -1273,16 +1275,51 @@ static void stubdom_pvqemu_cb(libxl__egc *egc, > rc = libxl_domain_unpause(CTX, dm_domid); > if (rc) goto out; > > + libxl__xswait_init(&sdss->xswait); I just discovered a bug. This line should be moved to the beginning of this function, otherwise the error path will cause client program to segfault. Wei. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |