[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] libxl: provide a flag in dominfo to avoid stopping it



commit 15a66f1119938c92752589c79eff9ded2c95128a
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Mon Jan 18 09:03:52 2016 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Mon Jan 18 16:34:19 2016 +0000

    libxl: provide a flag in dominfo to avoid stopping it
    
    Add a "never_stop" flag to dominfo as indicator for the toolstack that
    this domain is to be kept running. For now it is being set for xenstore
    domain, but there might be other domains in the future.
    
    Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/libxl/libxl.c         |   11 ++++++-----
 tools/libxl/libxl.h         |    9 +++++++++
 tools/libxl/libxl_types.idl |    1 +
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index abb2845..a8718b0 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -623,11 +623,12 @@ static void xcinfo2xlinfo(libxl_ctx *ctx,
                                    &xlinfo->ssid_label, &size) < 0)
         xlinfo->ssid_label = NULL;
 
-    xlinfo->dying    = !!(xcinfo->flags&XEN_DOMINF_dying);
-    xlinfo->shutdown = !!(xcinfo->flags&XEN_DOMINF_shutdown);
-    xlinfo->paused   = !!(xcinfo->flags&XEN_DOMINF_paused);
-    xlinfo->blocked  = !!(xcinfo->flags&XEN_DOMINF_blocked);
-    xlinfo->running  = !!(xcinfo->flags&XEN_DOMINF_running);
+    xlinfo->dying      = !!(xcinfo->flags&XEN_DOMINF_dying);
+    xlinfo->shutdown   = !!(xcinfo->flags&XEN_DOMINF_shutdown);
+    xlinfo->paused     = !!(xcinfo->flags&XEN_DOMINF_paused);
+    xlinfo->blocked    = !!(xcinfo->flags&XEN_DOMINF_blocked);
+    xlinfo->running    = !!(xcinfo->flags&XEN_DOMINF_running);
+    xlinfo->never_stop = !!(xcinfo->flags&XEN_DOMINF_xs_domain);
 
     if (xlinfo->shutdown)
         xlinfo->shutdown_reason = (xcinfo->flags>>XEN_DOMINF_shutdownshift) & 
XEN_DOMINF_shutdownmask;
diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
index 05606a7..7114491 100644
--- a/tools/libxl/libxl.h
+++ b/tools/libxl/libxl.h
@@ -560,6 +560,15 @@ typedef struct libxl__ctx libxl_ctx;
 #define LIBXL_HAVE_DOMINFO_OUTSTANDING_MEMKB 1
 
 /*
+ * LIBXL_HAVE_DOMINFO_NEVER_STOP
+ *
+ * If this is defined, libxl_dominfo will contain a flag called never_stop
+ * indicating that the specific domain should never be stopped by the
+ * toolstack.
+ */
+#define LIBXL_HAVE_DOMINFO_NEVER_STOP 1
+
+/*
  * LIBXL_HAVE_QXL
  *
  * If defined, then the libxl_vga_interface_type will contain another value:
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 9658356..9ad7eba 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -295,6 +295,7 @@ libxl_dominfo = Struct("dominfo",[
     ("paused",      bool),
     ("shutdown",    bool),
     ("dying",       bool),
+    ("never_stop",  bool),
 
     # Valid iff ->shutdown is true.
     #
--
generated by git-patchbot for /home/xen/git/xen.git#master

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.