# HG changeset patch
# User Paul Durrant <paul.durrant@xxxxxxxxxx>
# Date 1261499555 0
# Node ID 0107ef3d493a3402bab596e112cf00b14d148723
# Parent 5ef55c848f628aa08c67d54b1ebf802e4752e712
Add a xenops command to trigger a power button push in a domain
signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
diff -r 5ef55c848f62 -r 0107ef3d493a series
--- a/series Mon Dec 21 16:00:43 2009 +0000
+++ b/series Tue Dec 22 16:32:35 2009 +0000
@@ -60,6 +60,7 @@
vif-hotplug-vswitch.patch
vswitch-pool-controller-config.patch
+xenops-trigger-power.patch
# experimental networking improvements
netw-reset-call #+new-netw
diff -r 5ef55c848f62 -r 0107ef3d493a xenops-trigger-power.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/xenops-trigger-power.patch Tue Dec 22 16:32:35 2009 +0000
@@ -0,0 +1,46 @@
+diff -r 168cfcdf8390 ocaml/xenops/domain.ml
+--- a/ocaml/xenops/domain.ml Tue Dec 22 10:02:37 2009 +0000
++++ b/ocaml/xenops/domain.ml Tue Dec 22 16:09:38 2009 +0000
+@@ -797,6 +797,8 @@
+
+ let send_s3resume ~xc domid = Xc.domain_send_s3resume xc domid
+
++let trigger_power ~xc domid = Xc.domain_trigger_power xc domid
++
+ let vcpu_affinity_set ~xc domid vcpu cpumap =
+ let bitmap = ref Int64.zero in
+ if Array.length cpumap > 64 then
+diff -r 168cfcdf8390 ocaml/xenops/domain.mli
+--- a/ocaml/xenops/domain.mli Tue Dec 22 10:02:37 2009 +0000
++++ b/ocaml/xenops/domain.mli Tue Dec 22 16:09:38 2009 +0000
+@@ -151,6 +151,9 @@
+ (** send a s3resume event to a domain *)
+ val send_s3resume: xc: Xc.handle -> domid -> unit
+
++(** send a power button push to a domain *)
++val trigger_power: 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 168cfcdf8390 ocaml/xenops/xenops.ml
+--- a/ocaml/xenops/xenops.ml Tue Dec 22 10:02:37 2009 +0000
++++ b/ocaml/xenops/xenops.ml Tue Dec 22 16:09:38 2009 +0000
+@@ -603,6 +603,7 @@
+ ("balance" , []);
+ ("watchdog" , watchdog_args);
+ ("send-s3resume" , common);
++ ("trigger-power" , common);
+ ("dmesg" , []);
+ ("debugkeys" , []);
+ ("physinfo" , []);
+@@ -809,6 +810,9 @@
+ | "send-s3resume" ->
+ assert_domid ();
+ with_xc (fun xc -> Domain.send_s3resume ~xc domid);
++ | "trigger-power" ->
++ assert_domid ();
++ with_xc (fun xc -> Domain.trigger_power ~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
|