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-devel

[Xen-devel] [PATCH] libxl: allow guest to write "control/shutdown" xenst

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxl: allow guest to write "control/shutdown" xenstore node
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Tue, 08 Feb 2011 17:18:56 +0000
Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
Delivery-date: Tue, 08 Feb 2011 09:19:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1297182367 0
# Node ID a46b91cd8202726aecd9ddefd8e75faff48144d6
# Parent  deaa7bc1a7ff6cfad7865394cb8b7205741004c9
libxl: allow guest to write "control/shutdown" xenstore node.

The PV shutdown/reboot/suspend protocol requires that the guest
acknowledge a request by clearing the node therefore it is necessary
to allow the guest to write to the node.

Currently libxl is quite relaxed about this protocol and doesn't
reeally seem to mind that the guest is unable to write the node to
perform the acknowledgement. However in a followup patch libxl needs
to be able to detect that a guest has acknowledged a suspend request.

A side effect of this change is that an empty "control/shutdown" node
is created upon domain creation instead of only being created when a
shutdown/reboot/suspend is requested. This should not (and does not
in my tests) have any negative impact on the guest.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

diff -r deaa7bc1a7ff -r a46b91cd8202 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Tue Feb 08 09:13:38 2011 +0000
+++ b/tools/libxl/libxl_create.c        Tue Feb 08 16:26:07 2011 +0000
@@ -290,7 +290,7 @@ int libxl__domain_make(libxl_ctx *ctx, l
     libxl__gc gc = LIBXL_INIT_GC(ctx); /* fixme: should be done by caller */
     int flags, ret, i, rc;
     char *uuid_string;
-    char *rw_paths[] = { "device", "device/suspend/event-channel" , "data"};
+    char *rw_paths[] = { "control/shutdown", "device", 
"device/suspend/event-channel" , "data"};
     char *ro_paths[] = { "cpu", "memory", "device", "error", "drivers",
                          "control", "attr", "messages" };
     char *dom_path, *vm_path;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] libxl: allow guest to write "control/shutdown" xenstore node, Ian Campbell <=