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] [PATCH 0/4] Add "xl info" command

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Ian.Jackson@xxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 0/4] Add "xl info" command
From: Andre Przywara <andre.przywara@xxxxxxx>
Date: Sun, 18 Apr 2010 23:17:49 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 18 Apr 2010 14:18:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.18 (X11/20081105)
Hi,

as already mentioned in previous emails, the "info" subcommand is missing from the xl tool. The attached patchset adds support for this, extending libxl on the way to provide the necessary info only by using own functions. On my system the output of xm info and xl info was identical, I omitted the recent NUMA additions from xl info for now and will provide the
necessary patches later.

Most of the additions are straightforward, just some words on libxl_get_version_info(): The xen_version hypercall uses statically allocated memory for passing strings (e.g. 1024 Bytes for commandline). To gather all information, one has to hypercall multiple times with different arg values, each information also has a different (static) result type. To make this more user friendly in libxl, I created a structure holding all information in dynamically allocated pointers. These will be malloced and filled on calling libxl_get_version_info() and have to be freed by the caller (with libxl_free_version_info()). To avoid doing several hypercalls and copying unnecessary memory, I used a bitmask to select the pieces of information the caller is interested. This is especially useful if one wants to know the Xen version or the PAGESIZE only. For xl info there is a LIBXL_VERSION_ALL_MASK to get all of them.

Please apply!

Regards,
Andre.

--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 488-3567-12


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