xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Add "xl info" command
@ 2010-04-18 21:17 Andre Przywara
  2010-04-18 21:23 ` [PATCH 1/4] libxl: extend physinfo structure Andre Przywara
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Andre Przywara @ 2010-04-18 21:17 UTC (permalink / raw)
  To: Keir Fraser, Stefano Stabellini, Ian.Jackson
  Cc: xen-devel@lists.xensource.com

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

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2010-04-21 12:53 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-18 21:17 [PATCH 0/4] Add "xl info" command Andre Przywara
2010-04-18 21:23 ` [PATCH 1/4] libxl: extend physinfo structure Andre Przywara
2010-04-19  7:50   ` Vincent Hanquez
2010-04-19 15:27     ` [PATCH 1/4] libxl: extend physinfo structure [and 1 more messages] Ian Jackson
2010-04-18 21:25 ` [PATCH 2/4] libxl: add sched_get_id function Andre Przywara
2010-04-19  7:50   ` Vincent Hanquez
2010-04-19 15:29     ` [PATCH 2/4] libxl: add sched_get_id function [and 1 more messages] Ian Jackson
2010-04-18 21:26 ` [PATCH 3/4] libxl: add version_info function Andre Przywara
2010-04-19  8:08   ` Vincent Hanquez
2010-04-19 15:36     ` [PATCH 3/4] libxl: add version_info function [and 1 more messages] Ian Jackson
2010-04-19 16:07       ` Vincent Hanquez
2010-04-19 16:21         ` Ian Jackson
2010-04-19 16:41           ` Vincent Hanquez
2010-04-19 20:43       ` Andre Przywara
2010-04-20  8:36         ` Vincent Hanquez
2010-04-21 12:10           ` Andre Przywara
2010-04-21 12:53             ` Vincent Hanquez
2010-04-18 21:28 ` [PATCH 4/4] xl: add "xl info" command Andre Przywara
2010-04-19 15:38   ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).