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

[Xen-changelog] [xen-unstable] libxl: extend physinfo structure



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1271925451 -3600
# Node ID a02f1de9b8a32b1cb37ebfee79a7a994994c1989
# Parent  b0562b298d737162980c706e2638f6062d5539fd
libxl: extend physinfo structure

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@xxxxxxx>
Acked-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c |    4 ++++
 tools/libxl/libxl.h |    4 ++++
 2 files changed, 8 insertions(+)

diff -r b0562b298d73 -r a02f1de9b8a3 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Wed Apr 21 12:51:53 2010 +0100
+++ b/tools/libxl/libxl.c       Thu Apr 22 09:37:31 2010 +0100
@@ -2344,6 +2344,10 @@ int libxl_get_physinfo(struct libxl_ctx 
     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 b0562b298d73 -r a02f1de9b8a3 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Wed Apr 21 12:51:53 2010 +0100
+++ b/tools/libxl/libxl.h       Thu Apr 22 09:37:31 2010 +0100
@@ -426,6 +426,10 @@ struct libxl_physinfo {
     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);

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


 


Rackspace

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