WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: extend physinfo structure
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Apr 2010 17:30:15 -0700
Delivery-date: Thu, 22 Apr 2010 17:30:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: extend physinfo structure, Xen patchbot-unstable <=