From: Ian Campbell Subject: Re: [RFC PATCH V3 1/2] xen: pass kernel initrd to qemu Date: Wed, 2 Jul 2014 15:40:18 +0100 Message-ID: <1404312018.30432.5.camel@kazak.uk.xensource.com> References: <1403244196-19630-1-git-send-email-cyliu@suse.com> <1403244196-19630-2-git-send-email-cyliu@suse.com> <21416.14398.695327.278606@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21416.14398.695327.278606@mariner.uk.xensource.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Ian Jackson Cc: xen-devel@lists.xensource.com, Chunyan Liu , stefano.stabellini@eu.citrix.com, qemu-devel@nongnu.org List-Id: xen-devel@lists.xenproject.org On Mon, 2014-06-23 at 15:22 +0100, Ian Jackson wrote: > > +/* > > + * LIBXL_HAVE_BUILDINFO_HVM_DIRECT_KERNEL_BOOT > > + * > > + * If this is defined, then the libxl_domain_build_info structure will > > + * contain hvm.kernel, hvm.cmdline and hvm.ramdisk. hvm.kernel is a string > > + * to indicate kernel image location, hvm.ramdisk is a string to indicate > > + * ramdisk location, hvm.cmdline is a string to indicate the paramters which > > + * would be appened to kernel image. > > If we are going to do this then I think the kernel, cmdline and > ramdisk (and bootloader) parameters shoudl be moved into the main part > of the domain_build_info struct. This will involve a compatibility > layer: temporarily (for at least one release) I don't think so -- we would need to retain it forever or at least until some sort of "API break" event. We still guarantee that applications using the 4.2 API will be supported. > both will be supported > so the IDL will have to have both and code inside libxl will have to > honour either. > > The #define should then be > LIBXL_HAVE_BUILD_INFO_CMDLINE > or some such - because all libxl callers will want to update to the > new API eventually. > > > +static char *parse_cmdline(XLU_Config *config) > > +{ > > + char *cmdline = NULL; > > + const char *root = NULL, *extra = NULL, *buf = NULL; > > + > > + xlu_cfg_get_string (config, "cmdline", &buf, 0); > > + xlu_cfg_get_string (config, "root", &root, 0); > > + xlu_cfg_get_string (config, "extra", &extra, 0); > > + > > + if (buf) { > > + cmdline = strdup(buf); > > + if (root || extra) > > + fprintf(stderr, "Warning: ignoring deprecated root= and extra= " > > + "in favour of cmdline=\n"); > > Why are you deprecating root= and extra= ? I suggested this. They are suckful interfaces which expose Linux specifics (e.g. the root= syntax) in our guest cfg files. cmdline is the generic equivalent. However, I didn't mean for them to not work, just that cmdline would be preferred. > They seem likely to be a useful distinction if we decide to add > further default options in the future. > > If you do want to deprecate them, you should make this very clear - > probably by putting that change in a separate patch in your series. > > Thanks, > Ian.