From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: [PATCH 1/4] libxl: extend physinfo structure Date: Sun, 18 Apr 2010 23:23:21 +0200 Message-ID: <4BCB7849.9030302@amd.com> References: <4BCB76FD.1020103@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020803060706020803030002" Return-path: In-Reply-To: <4BCB76FD.1020103@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , Stefano Stabellini , Ian.Jackson@eu.citrix.com Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --------------020803060706020803030002 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit The libxl version of the physinfo sysctl does not contain some fields like nr_nodes or capabilities needed for xl info output. Add them to the structure and the retrieving function. Signed-off-by: Andre Przywara -- Andre Przywara AMD-Operating System Research Center (OSRC), Dresden, Germany Tel: +49 351 488-3567-12 --------------020803060706020803030002 Content-Type: text/plain; name="libxl_physinfo_ext.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libxl_physinfo_ext.patch" diff -r 7ee8bb40200a tools/libxl/libxl.c --- a/tools/libxl/libxl.c Thu Apr 15 19:11:16 2010 +0100 +++ b/tools/libxl/libxl.c Sun Apr 18 14:34:32 2010 +0200 @@ -2344,6 +2344,10 @@ physinfo->total_pages = xcphysinfo.total_pages; physinfo->free_pages = xcphysinfo.free_pages; physinfo->scrub_pages = xcphysinfo.scrub_pages; + physinfo->nr_nodes = xcphysinfo.nr_nodes; + memcpy(physinfo->hw_cap,xcphysinfo.hw_cap, sizeof(physinfo->hw_cap)); + physinfo->phys_cap = xcphysinfo.capabilities; + return 0; } diff -r 7ee8bb40200a tools/libxl/libxl.h --- a/tools/libxl/libxl.h Thu Apr 15 19:11:16 2010 +0100 +++ b/tools/libxl/libxl.h Sun Apr 18 14:34:32 2010 +0200 @@ -415,6 +415,9 @@ uint64_t *cpumap; /* current cpu's affinities */ }; +#define PHYS_CAP_HVM 1 +#define PHYS_CAP_HVM_DIRECTIO 2 + struct libxl_physinfo { uint32_t threads_per_core; uint32_t cores_per_socket; @@ -426,6 +429,10 @@ uint64_t total_pages; uint64_t free_pages; uint64_t scrub_pages; + + uint32_t nr_nodes; + uint32_t hw_cap[8]; + uint32_t phys_cap; }; int libxl_get_physinfo(struct libxl_ctx *ctx, struct libxl_physinfo *physinfo); --------------020803060706020803030002 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------020803060706020803030002--