]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: extend physinfo structure
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 22 Apr 2010 08:37:31 +0000 (09:37 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 22 Apr 2010 08:37:31 +0000 (09:37 +0100)
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.com>
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl.h

index f1fe35d67eeaf215367b78fa85018a663c801ee9..1ef4325e7d76abbe7c546adfe8f6a167295c7d89 100644 (file)
@@ -2344,6 +2344,10 @@ int libxl_get_physinfo(struct libxl_ctx *ctx, struct libxl_physinfo *physinfo)
     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;
 }
 
index 6236059a2db844e3b16594e0a25a576326932604..8b9d869426fade6e6c1fe076335ea1d2b09d7169 100644 (file)
@@ -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);