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