[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 6/9] libxl: add Qdisk backend launch helper
On Mon, Nov 18, 2013 at 03:56:28PM +0100, Roger Pau Monne wrote: > Current Qemu launch functions in libxl require the usage of data > structures only avaialbe on domain creation. All this information is > not need in order to launch a Qemu instance to serve Qdisk backends, > so introduce a new simplified helper that can be used to launch > Qemu/Qdisk, that will be used to launch Qdisk in driver domains. > > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> > Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> > Cc: Ian Campbell <ian.campbell@xxxxxxxxxx> > Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx> > Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> > --- > tools/libxl/libxl_dm.c | 146 > +++++++++++++++++++++++++++++++++++++----- > tools/libxl/libxl_internal.h | 6 ++ > 2 files changed, 136 insertions(+), 16 deletions(-) > > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c > index b4798b8..64123aa 100644 > --- a/tools/libxl/libxl_dm.c > +++ b/tools/libxl/libxl_dm.c > @@ -1320,18 +1335,91 @@ static void device_model_spawn_outcome(libxl__egc > *egc, > dmss->callback(egc, dmss, rc); > } > > -int libxl__destroy_device_model(libxl__gc *gc, uint32_t domid) > +void libxl__spawn_qdisk_backend(libxl__egc *egc, libxl__dm_spawn_state *dmss) > { > - char *pid; > - int ret; > + STATE_AO_GC(dmss->spawn.ao); > + flexarray_t *dm_args; > + char **args; > + const char *dm; > + int logfile_w, null, rc; > + uint32_t domid = dmss->guest_domid; > + > + /* Always use qemu-xen as device model */ > + dm = qemu_xen_path(gc); > + > + dm_args = flexarray_make(gc, 15, 1); > + flexarray_vappend(dm_args, dm, "-xen-domid", > + GCSPRINTF("%d", domid), NULL); > + flexarray_append(dm_args, "-xen-attach"); > + flexarray_vappend(dm_args, "-name", > + GCSPRINTF("domain-%u", domid), NULL); > + flexarray_append(dm_args, "-nographic"); > + flexarray_vappend(dm_args, "-M", "xenpv", NULL); > + flexarray_vappend(dm_args, "-monitor", "/dev/null", NULL); > + flexarray_vappend(dm_args, "-serial", "/dev/null", NULL); > + flexarray_vappend(dm_args, "-parallel", "/dev/null", NULL); You might want to look at the -nodefaults option of QEMU instead of using -nographic -monitor -serial -parallel. -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |