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] Merge font.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Merge font.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Mon, 17 Jan 2005 13:39:09 +0000
Delivery-date: Mon, 09 May 2005 18:03:27 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1159.170.101, 2005/01/17 13:39:09+00:00, sd386@xxxxxxxxxxxxxxxxx

        Merge font.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
        into font.cl.cam.ac.uk:/local/scratch/sd386/xen-2.0-testing.bk



 tools/libxc/Makefile                      |    3 
 tools/libxc/xc.h                          |  212 ++++++++++++++++++++++++++++--
 tools/python/xen/lowlevel/xc/xc.c         |   35 ++++
 tools/python/xen/xend/XendClient.py       |    5 
 tools/python/xen/xend/XendDomain.py       |    4 
 tools/python/xen/xend/server/SrvDomain.py |    3 
 tools/python/xen/xm/main.py               |   15 +-
 xen/common/schedule.c                     |    6 
 8 files changed, 260 insertions(+), 23 deletions(-)


diff -Nru a/tools/libxc/Makefile b/tools/libxc/Makefile
--- a/tools/libxc/Makefile      2005-05-09 14:03:55 -04:00
+++ b/tools/libxc/Makefile      2005-05-09 14:03:55 -04:00
@@ -1,5 +1,5 @@
 
-MAJOR    = 1.3
+MAJOR    = 2.0
 MINOR    = 0
 SONAME   = libxc.so.$(MAJOR)
 
@@ -19,6 +19,7 @@
 SRCS     += xc_evtchn.c
 SRCS     += xc_io.c
 SRCS     += xc_linux_build.c
+SRCS     += xc_plan9_build.c
 SRCS     += xc_linux_restore.c
 SRCS     += xc_linux_save.c
 SRCS     += xc_misc.c
diff -Nru a/tools/libxc/xc.h b/tools/libxc/xc.h
--- a/tools/libxc/xc.h  2005-05-09 14:03:55 -04:00
+++ b/tools/libxc/xc.h  2005-05-09 14:03:55 -04:00
@@ -9,14 +9,15 @@
 #ifndef __XC_H__
 #define __XC_H__
 
-typedef unsigned char      u8;
-typedef unsigned short     u16;
-typedef unsigned long      u32;
-typedef unsigned long long u64;
-typedef signed char        s8;
-typedef signed short       s16;
-typedef signed long        s32;
-typedef signed long long   s64;
+#include <stdint.h>
+typedef uint8_t            u8;
+typedef uint16_t           u16;
+typedef uint32_t           u32;
+typedef uint64_t           u64;
+typedef int8_t             s8;
+typedef int16_t            s16;
+typedef int32_t            s32;
+typedef int64_t            s64;
 
 #include <xen/xen.h>
 #include <xen/dom0_ops.h>
@@ -24,10 +25,40 @@
 #include <xen/sched_ctl.h>
 #include <xen/io/domain_controller.h>
 
-/* Obtain or relinquish a handle on the 'xc' library. */
+/*\
+ *  INITIALIZATION FUNCTIONS
+\*/ 
+
+/**
+ * This function opens a handle to the hypervisor interface.  This function can
+ * be called multiple times within a single process.  Multiple processes can
+ * have an open hypervisor interface at the same time.
+ *
+ * Each call to this function should have a corresponding call to
+ * xc_interface_close().
+ *
+ * This function can fail if the caller does not have superuser permission or
+ * if a Xen-enabled kernel is not currently running.
+ *
+ * @return a handle to the hypervisor interface or -1 on failure
+ */
 int xc_interface_open(void);
+
+/**
+ * This function closes an open hypervisor interface.
+ *
+ * This function can fail if the handle does not represent an open interface or
+ * if there were problems closing the interface.
+ *
+ * @parm xc_handle a handle to an open hypervisor interface
+ * @return 0 on success, -1 otherwise.
+ */
 int xc_interface_close(int xc_handle);
 
+/*\
+ * DOMAIN MANAGEMENT FUNCTIONS
+\*/
+
 typedef struct {
     u32           domid;
     unsigned int  cpu;
@@ -46,19 +77,69 @@
                      int cpu,
                      float cpu_weight,
                      u32 *pdomid);
+
+/**
+ * This function pauses a domain. A paused domain still exists in memory
+ * however it does not receive any timeslices from the hypervisor.
+ *
+ * @parm xc_handle a handle to an open hypervisor interface
+ * @parm domid the domain id to pause
+ * @return 0 on success, -1 on failure.
+ */
 int xc_domain_pause(int xc_handle, 
                     u32 domid);
+/**
+ * This function unpauses a domain.  The domain should have been previously
+ * paused.
+ *
+ * @parm xc_handle a handle to an open hypervisor interface
+ * @parm domid the domain id to unpause
+ * return 0 on success, -1 on failure
+ */
 int xc_domain_unpause(int xc_handle, 
                       u32 domid);
+
+/**
+ * This function will destroy a domain.  Destroying a domain removes the domain
+ * completely from memory.  This function should be called after sending the
+ * domain a SHUTDOWN control message to free up the domain resources.
+ *
+ * @parm xc_handle a handle to an open hypervisor interface
+ * @parm domid the domain id to destroy
+ * @return 0 on success, -1 on failure
+ */
 int xc_domain_destroy(int xc_handle, 
                       u32 domid);
 int xc_domain_pincpu(int xc_handle,
                      u32 domid,
                      int cpu);
+/**
+ * This function will return information about one or more domains.
+ *
+ * @parm xc_handle a handle to an open hypervisor interface
+ * @parm first_domid the first domain to enumerate information from.  Domains
+ *                   are currently enumerate in order of creation.
+ * @parm max_doms the number of elements in info
+ * @parm info an array of max_doms size that will contain the information for
+ *            the enumerated domains.
+ * @return the number of domains enumerated or -1 on error
+ */
 int xc_domain_getinfo(int xc_handle,
                       u32 first_domid, 
                       unsigned int max_doms,
                       xc_dominfo_t *info);
+
+/**
+ * This function returns information about one domain.  This information is
+ * more detailed than the information from xc_domain_getinfo().
+ *
+ * @parm xc_handle a handle to an open hypervisor interface
+ * @parm domid the domain to get information from
+ * @parm info a pointer to an xc_domaininfo_t to store the domain information
+ * @parm ctxt a pointer to a structure to store the execution context of the
+ *            domain
+ * @return 0 on success, -1 on failure
+ */
 int xc_domain_getfullinfo(int xc_handle,
                           u32 domid,
                           xc_domaininfo_t *info,
@@ -85,7 +166,27 @@
 #define XCFLAGS_CONFIGURE 8
 
 struct XcIOContext;
+
+/**
+ * This function will save a domain running Linux to an IO context.  This
+ * IO context is currently a private interface making this function difficult
+ * to call.  It's interface will likely change in the future.
+ *
+ * @parm xc_handle a handle to an open hypervisor interface
+ * @parm ioctxt the IO context to save a domain to
+ * @return 0 on success, -1 on failure
+ */
 int xc_linux_save(int xc_handle, struct XcIOContext *ioctxt);
+
+/**
+ * This function will restore a saved domain running Linux to an IO context.
+ * Like xc_linux_save(), this function uses a parameter who's structure is
+ * privately defined.  It's interface will also likely change.
+ *
+ * @parm xc_handle a handle to an open hypervisor interface
+ * @parm ioctxt the IO context to restore a domain from
+ * @return 0 on success, -1 on failure
+ */
 int xc_linux_restore(int xc_handle, struct XcIOContext *ioctxt);
 
 int xc_linux_build(int xc_handle,
@@ -96,6 +197,14 @@
                    unsigned int control_evtchn,
                    unsigned long flags);
 
+int
+xc_plan9_build (int xc_handle,
+                u32 domid, 
+                const char *image_name,
+                const char *cmdline, 
+               unsigned int control_evtchn, 
+               unsigned long flags);
+
 int xc_bvtsched_global_set(int xc_handle,
                            unsigned long ctx_allow);
 
@@ -141,20 +250,75 @@
                           u64* period, u64 *slice);
 
 typedef evtchn_status_t xc_evtchn_status_t;
+
+/*\
+ * EVENT CHANNEL FUNCTIONS
+\*/
+
+/**
+ * This function allocates an unbound port.  Ports are named endpoints used for
+ * interdomain communication.  This function is most useful in opening a
+ * well-known port within a domain to receive events on.
+ *
+ * @parm xc_handle a handle to an open hypervisor interface
+ * @parm dom the ID of the domain.  This maybe DOMID_SELF
+ * @parm port a pointer to a port.  This is an in/out parameter.  If *port is
+ *            0, then a new port will be assigned, if port is > 0 then that
+ *            port is allocated if the port is unallocated.
+ * @return 0 on success, -1 on failure
+ */
 int xc_evtchn_alloc_unbound(int xc_handle,
                             u32 dom,
                             int *port);
+
+/**
+ * This function creates a pair of ports between two domains.  A port can only
+ * be bound once within a domain.
+ *
+ * @parm xc_handle a handle to an open hypervisor interface
+ * @parm dom1 one of the two domains to connect.  Can be DOMID_SELF.
+ * @parm dom2 the other domain to connect.  Can be DOMID_SELF.
+ * @parm port1 an in/out parameter.  If > 0, then try to connect *port.  If
+ *             0, then allocate a new port and store the port in *port.
+ * @parm port2 the port connected on port2.  This parameter behaves the same
+ *             way as port1.
+ * @return 0 on success, -1 on error.
+ */
 int xc_evtchn_bind_interdomain(int xc_handle,
-                               u32 dom1,   /* may be DOMID_SELF */
-                               u32 dom2,   /* may be DOMID_SELF */
+                               u32 dom1,
+                               u32 dom2,
                                int *port1,
                                int *port2);
 int xc_evtchn_bind_virq(int xc_handle,
                         int virq,
                         int *port);
+
+/**

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Merge font.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk, BitKeeper Bot <=