[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Re: [PATCH] libxl: Support linux-stubdom in libxl



On Tue, 31 May 2011, Jiageng Yu wrote:
> author jiageng_yu <yujiageng734@xxxxxxxxx>
> Tue, 31 May 2011 02:18:01 +0000 (03:18 +0100)
> committer jiageng_yu <yujiageng734@xxxxxxxxx>
> ue, 31 May 2011 02:18:01 +0000 (03:18 +0100)
> commit 179b4167dd9e86a06a700d60e277c4477f0c06ef
> tree 4e4c8492b480e08d9122abcb37aca52ae5650786 tree | snapshot (tar.gz zip)
> parent cf4866b9161a724e4b2c366da73de271cf7ef348 commit | diff
> 
> libxl: Support linux-stubdom in libxl
> 
> Add linux-stubdom support in libxl. Users could start a linux-stubdom
> throuh the following options:
> device_model_override = 'linux-stubdom'
> device_model_stubdomain_override=1
> 

I would avoid using device_model_override to select linux stubdoms:
device_model_override is used to specify a path to a qemu binary and it
is better to keep it that way.
I would rather introduce a new boolean config option, for example
device_model_linux_stubdomain_override.


> linux-stubdom project: http://repo.or.cz/w/linux-based-stubdoms.git
> 
> 
> diff -r 37c77bacb52a tools/libxl/libxl_dm.c
> --- a/tools/libxl/libxl_dm.c  Mon May 23 17:38:28 2011 +0100
> +++ b/tools/libxl/libxl_dm.c  Tue May 31 02:41:59 2011 +0100
> @@ -556,6 +556,14 @@
>      return 0;
>  }
> 
> +inline int libxl__is_linux_stubdom(libxl_device_model_info *info)
> +{
> +     
> if(!strncmp(info->device_model,"linux-stubdom",strlen(info->device_model)))
> +             return 1;
> +     else
> +             return 0;
> +};
> +

Same as before: it is better to avoid parsing the device model string
here. I would rather change device_model_stubdomain to be an enum so
that it can specify: "no stubdom", "MiniOS stubdom", "Linux stubdom".

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.