]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
libxl: provide a flag in dominfo to avoid stopping it
authorJuergen Gross <jgross@suse.com>
Mon, 18 Jan 2016 08:03:52 +0000 (09:03 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 18 Jan 2016 16:34:19 +0000 (16:34 +0000)
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@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl.h
tools/libxl/libxl_types.idl

index abb2845900f6701ac57cc2fc2434da7fbde2045a..a8718b0d10ef0282a9db7b4c02a7fc52bd5b8be6 100644 (file)
@@ -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;
index 05606a74f215793e3e859ab5180658d3d023a0a9..7114491b039ee3132c8f40cf7ed899d78af23a91 100644 (file)
@@ -559,6 +559,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
  *
index 9658356b0da61707282405db1feac2959c6a3c09..9ad7eba0dcb64bea566896d8e049ecb498edd7a7 100644 (file)
@@ -295,6 +295,7 @@ libxl_dominfo = Struct("dominfo",[
     ("paused",      bool),
     ("shutdown",    bool),
     ("dying",       bool),
+    ("never_stop",  bool),
 
     # Valid iff ->shutdown is true.
     #