[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] Re: [PATCH] libxl: enabling upstream qemu as pure pv backend.
On Wed, 2011-06-08 at 12:33 +0100, Stefano Stabellini wrote: > On Wed, 8 Jun 2011, Wei Liu wrote: > > commit 02cf9f9cfdf720c636c6ba08f795e49b5eb1f03e > > Author: Wei Liu <liuw@xxxxxxxxx> > > Date: Wed Jun 8 11:13:25 2011 +0800 > > > > libxl: enabling upstream qemu as pure pv backend. > > > > This patch makes device_model_{version,override} work for pure pv > > guest, so that users can specify upstream qemu as pure pv backend > > other than traditional qemu-xen. > > > > Signed-off-by: Wei Liu <liuw@xxxxxxxxx> > > > > diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c > > index 62294b2..4ff3c7d 100644 > > --- a/tools/libxl/libxl_create.c > > +++ b/tools/libxl/libxl_create.c > > @@ -507,7 +507,8 @@ static int do_domain_create(libxl__gc *gc, > > libxl_domain_config *d_config, > > libxl_device_console_destroy(&console); > > > > if (need_qemu) > > - libxl__create_xenpv_qemu(gc, domid, d_config->vfbs, > > &dm_starting); > > + libxl__create_xenpv_qemu(gc, domid, &d_config->dm_info, > > + d_config->vfbs, &dm_starting); > > } > > > > if (dm_starting) { > > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c > > index 47a51c8..0505c84 100644 > > --- a/tools/libxl/libxl_dm.c > > +++ b/tools/libxl/libxl_dm.c > > @@ -702,7 +702,7 @@ retry_transaction: > > if (ret) > > goto out_free; > > } > > - if (libxl__create_xenpv_qemu(gc, domid, vfb, &dm_starting) < 0) { > > + if (libxl__create_xenpv_qemu(gc, domid, info, vfb, &dm_starting) < 0) { > > ret = ERROR_FAIL; > > goto out_free; > > } > > @@ -909,8 +909,8 @@ static int libxl__build_xenpv_qemu_args(libxl__gc *gc, > > libxl_device_model_info *info) > > { > > libxl_ctx *ctx = libxl__gc_owner(gc); > > - memset(info, 0x00, sizeof(libxl_device_model_info)); > > > > + info->vnc = 0; > > if (vfb != NULL) { > > info->vnc = vfb->vnc; > > if (vfb->vnclisten) > > @@ -927,9 +927,12 @@ static int libxl__build_xenpv_qemu_args(libxl__gc *gc, > > info->nographic = 1; > > info->domid = domid; > > info->dom_name = libxl_domid_to_name(ctx, domid); > > - info->device_model_version = > > LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL; > > - info->device_model = NULL; > > - info->type = LIBXL_DOMAIN_TYPE_PV; > > + info->target_ram = 0; > > + info->videoram = 0; > > + info->acpi = 0; > > + info->vcpus = 0; > > + info->vcpu_avail = 0; > > + info->xen_platform_pci = 0; > > return 0; > > } > > I don't think is a good idea to reset all these value to 0 here, > considering that the info parameter can be passed by the user. > It is better to use another libxl_device_model_info local variable and > just copy the very few fields we care about. > Otherwise in the stubdom case above you'll have the unwanted side effect > of removing useful informations of the stubdom from the structure. I think ideally the struct would be the same for both the PV and FV qemu and the device model create would only pay attention to the bits which fit the scenario (i.e. the PV case would ignore vcpus != 0, not zero it). This allows us to pass the same instance to both the PV and FV arg constructions routines in the stubdom+PV qemu case. Ian. > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@xxxxxxxxxxxxxxxxxxx > http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |