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>
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 488-3567-12
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);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|