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

[Xen-API] [PATCH] Add a xenops command to trigger a sleep button push in a domain



# HG changeset patch
# User Paul Durrant <paul.durrant@xxxxxxxxxx>
# Date 1262711225 0
# Node ID c19bc31140410977e6ce1634d3d90456b51b6ad7
# Parent  0107ef3d493a3402bab596e112cf00b14d148723
Add a xenops command to trigger a sleep button push in a domain

signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

diff -r 0107ef3d493a -r c19bc3114041 series
--- a/series    Tue Dec 22 16:32:35 2009 +0000
+++ b/series    Tue Jan 05 17:07:05 2010 +0000
@@ -61,6 +61,7 @@
 
 vswitch-pool-controller-config.patch
 xenops-trigger-power.patch
+xenops-trigger-sleep.patch
 
 # experimental networking improvements
 netw-reset-call #+new-netw
diff -r 0107ef3d493a -r c19bc3114041 xenops-trigger-sleep.patch
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/xenops-trigger-sleep.patch        Tue Jan 05 17:07:05 2010 +0000
@@ -0,0 +1,45 @@
+diff -r 8a20aae0586b ocaml/xenops/domain.ml
+--- a/ocaml/xenops/domain.ml   Tue Dec 22 16:09:38 2009 +0000
++++ b/ocaml/xenops/domain.ml   Wed Dec 23 14:18:35 2009 +0000
+@@ -798,6 +798,7 @@
+ let send_s3resume ~xc domid = Xc.domain_send_s3resume xc domid
+ 
+ let trigger_power ~xc domid = Xc.domain_trigger_power xc domid
++let trigger_sleep ~xc domid = Xc.domain_trigger_sleep xc domid
+ 
+ let vcpu_affinity_set ~xc domid vcpu cpumap =
+       let bitmap = ref Int64.zero in
+diff -r 8a20aae0586b ocaml/xenops/domain.mli
+--- a/ocaml/xenops/domain.mli  Tue Dec 22 16:09:38 2009 +0000
++++ b/ocaml/xenops/domain.mli  Wed Dec 23 14:18:35 2009 +0000
+@@ -154,6 +154,9 @@
+ (** send a power button push to a domain *)
+ val trigger_power: xc: Xc.handle -> domid -> unit
+ 
++(** send a sleep button push to a domain *)
++val trigger_sleep: xc: Xc.handle -> domid -> unit
++
+ (** Set cpu affinity of some vcpus of a domain using an boolean array *)
+ val vcpu_affinity_set: xc: Xc.handle -> domid -> int -> bool array -> unit
+ 
+diff -r 8a20aae0586b ocaml/xenops/xenops.ml
+--- a/ocaml/xenops/xenops.ml   Tue Dec 22 16:09:38 2009 +0000
++++ b/ocaml/xenops/xenops.ml   Wed Dec 23 14:18:35 2009 +0000
+@@ -604,6 +604,7 @@
+               ("watchdog"       , watchdog_args);
+               ("send-s3resume"  , common);
+               ("trigger-power"  , common);
++              ("trigger-sleep"  , common);
+               ("dmesg"          , []);
+               ("debugkeys"      , []);
+               ("physinfo"       , []);
+@@ -813,6 +814,9 @@
+       | "trigger-power" ->
+               assert_domid ();
+               with_xc (fun xc -> Domain.trigger_power ~xc domid);
++      | "trigger-sleep" ->
++              assert_domid ();
++              with_xc (fun xc -> Domain.trigger_sleep ~xc domid);
+       | "dmesg" ->
+               with_xc (fun xc -> print_xen_dmesg ~xc);
+       | "debugkeys" ->

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api


 


Rackspace

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