aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xc_misc.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-04-07 16:22:05 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-04-07 16:22:05 +0100
commit4d6e834ba9ca29c92af3bd18980cde71fd68d304 (patch)
tree0a70b38f07de9f5be02fb1eadc81ccc4543591c5 /tools/libxc/xc_misc.c
parent35e9666fc49c2e30753f671b1e8f72501b4c1409 (diff)
downloadxen-4d6e834ba9ca29c92af3bd18980cde71fd68d304.tar.gz
xen-4d6e834ba9ca29c92af3bd18980cde71fd68d304.tar.bz2
xen-4d6e834ba9ca29c92af3bd18980cde71fd68d304.zip
Host Numa information in dom0
'xm info' command now also gives the cpu topology & host numa information. This will be later used to build guest numa support. The patch basically changes physinfo sysctl, and adds topology_info & numa_info sysctls, and also changes the python & libxc code accordingly. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Diffstat (limited to 'tools/libxc/xc_misc.c')
-rw-r--r--tools/libxc/xc_misc.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c
index 662c2982fa..aa8f76dafe 100644
--- a/tools/libxc/xc_misc.c
+++ b/tools/libxc/xc_misc.c
@@ -80,6 +80,43 @@ int xc_physinfo(int xc_handle,
return 0;
}
+int xc_topologyinfo(int xc_handle,
+ xc_topologyinfo_t *put_info)
+{
+ int ret;
+ DECLARE_SYSCTL;
+
+ sysctl.cmd = XEN_SYSCTL_topologyinfo;
+
+ memcpy(&sysctl.u.topologyinfo, put_info, sizeof(*put_info));
+
+ if ( (ret = do_sysctl(xc_handle, &sysctl)) != 0 )
+ return ret;
+
+ memcpy(put_info, &sysctl.u.topologyinfo, sizeof(*put_info));
+
+ return 0;
+}
+
+int xc_numainfo(int xc_handle,
+ xc_numainfo_t *put_info)
+{
+ int ret;
+ DECLARE_SYSCTL;
+
+ sysctl.cmd = XEN_SYSCTL_numainfo;
+
+ memcpy(&sysctl.u.numainfo, put_info, sizeof(*put_info));
+
+ if ((ret = do_sysctl(xc_handle, &sysctl)) != 0)
+ return ret;
+
+ memcpy(put_info, &sysctl.u.numainfo, sizeof(*put_info));
+
+ return 0;
+}
+
+
int xc_sched_id(int xc_handle,
int *sched_id)
{