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] [xen-unstable] libxl: implement trigger s3resume

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: implement trigger s3resume
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Tue, 15 Feb 2011 00:35:26 -0800
Delivery-date: Tue, 15 Feb 2011 00:36:57 -0800
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
# Date 1297702143 0
# Node ID 51bd89ca047d29a4fc1ff0518dc60319914ccc49
# Parent  af84691a6cf9423a445f471af02b36b76ddf5314
libxl: implement trigger s3resume

This is the equivalent of xm trigger s3resume and it is implemented the
same way: using an ACPI state change.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Tested-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff -r af84691a6cf9 -r 51bd89ca047d tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Mon Feb 14 10:41:12 2011 +0000
+++ b/tools/libxl/libxl.c       Mon Feb 14 16:49:03 2011 +0000
@@ -2584,8 +2584,14 @@ int libxl_send_trigger(libxl_ctx *ctx, u
 int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid, char *trigger_name, 
uint32_t vcpuid)
 {
     int rc = -1;
-    int trigger_type = trigger_type_from_string(trigger_name);
-
+    int trigger_type = -1;
+
+    if (!strcmp(trigger_name, "s3resume")) {
+        xc_set_hvm_param(ctx->xch, domid, HVM_PARAM_ACPI_S_STATE, 0);
+        return 0;
+    }
+
+    trigger_type = trigger_type_from_string(trigger_name);
     if (trigger_type == -1) {
         LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, -1,
             "Invalid trigger, valid triggers are 
<nmi|reset|init|power|sleep>");

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: implement trigger s3resume, Xen patchbot-unstable <=