WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Jiageng Yu <yujiageng734@xxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] libxl: Support linux-stubdom in libxl
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Tue, 31 May 2011 15:38:14 +0100
Cc: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>, "Xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Tue, 31 May 2011 07:49:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <BANLkTikCb2GEodgNCDyL9_qgfLE42hc+pA@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <BANLkTikCb2GEodgNCDyL9_qgfLE42hc+pA@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
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

<Prev in Thread] Current Thread [Next in Thread>