Skip to contentSkip to conversation

tmem tools: tmem control plane libxc foundation

PATCH New Dan Magenheimer 1 participant 1 message Feb 6, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 tmem tools: tmem control plane libxc foundation

[1] tmem control plane libxc foundation

tools/libxc/Makefile +1 -0
diff -r c8962b24fb50 tools/libxc/Makefile
@@ -21,6 +21,7 @@ CTRL_SRCS-y       += xc_pm.c
 CTRL_SRCS-y       += xc_pm.c
 CTRL_SRCS-y       += xc_cpu_hotplug.c
 CTRL_SRCS-y       += xc_resume.c
+CTRL_SRCS-y       += xc_tmem.c
 CTRL_SRCS-$(CONFIG_X86) += xc_pagetab.c
 CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
 CTRL_SRCS-$(CONFIG_SunOS) += xc_solaris.c
tools/libxc/xc_tmem.c new file +82 -0

82 lines not on this page · raw message

tools/libxc/xenctrl.h +12 -0
diff -r c8962b24fb50 tools/libxc/xenctrl.h
@@ -1216,4 +1216,16 @@ int xc_set_cpufreq_gov(int xc_handle, in
 int xc_set_cpufreq_gov(int xc_handle, int cpuid, char *govname);
 int xc_set_cpufreq_para(int xc_handle, int cpuid,
                         int ctrl_type, int ctrl_value);
+
+/**
+ * tmem operations
+ */
+int xc_tmem_control(int xc,
+                    int32_t pool_id,
+                    uint32_t subop,
+                    uint32_t cli_id,
+                    uint32_t arg1,
+                    uint32_t arg2,
+                    void *buf);
+
 #endif /* XENCTRL_H */
tools/python/xen/xend/XendConstants.py +24 -0
diff -r c8962b24fb50 tools/python/xen/xend/XendConstants.py
@@ -134,3 +134,27 @@ VTPM_DELETE_SCRIPT = '/etc/xen/scripts/v
 
 XS_VMROOT = "/vm/"
 
+#
+# tmem
+#
+
+TMEM_CONTROL       = 0
+TMEM_NEW_POOL      = 1
+TMEM_DESTROY_POOL  = 2
+TMEM_NEW_PAGE      = 3
+TMEM_PUT_PAGE      = 4
+TMEM_GET_PAGE      = 5
+TMEM_FLUSH_PAGE    = 6
+TMEM_FLUSH_OBJECT  = 7
+TMEM_READ          = 8
+TMEM_WRITE         = 9
+TMEM_XCHG          = 10
+
+TMEMC_THAW         = 0
+TMEMC_FREEZE       = 1
+TMEMC_DESTROY      = 2
+TMEMC_LIST         = 3
+TMEMC_SET_WEIGHT   = 4
+TMEMC_SET_CAP      = 5
+TMEMC_SET_COMPRESS = 6
+

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel