File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ val suspend: xc: Xc.handle -> xs: Xs.xsh -> hvm: bool -> domid
180180val make_stubdom : xc : Xc .handle -> xs : Xs .xsh -> ioemuargs :string list -> stubdom_info -> [`domain ] Uuid .t -> domid
181181
182182(* * send a s3resume event to a domain *)
183- val send_s3resume : xc : Xc .handle -> domid -> unit
183+ val send_s3resume : xc : Xc .handle -> xs : Xs . xsh -> domid -> unit
184184
185185(* * Set cpu affinity of some vcpus of a domain using an boolean array *)
186186val vcpu_affinity_set : xc : Xc .handle -> domid -> int -> bool array -> unit
Original file line number Diff line number Diff line change @@ -550,7 +550,10 @@ let pause ~xc domid =
550550let unpause ~xc domid =
551551 Xc. domain_unpause xc domid
552552
553- let send_s3resume ~xc domid = Xc. domain_send_s3resume xc domid
553+ (* wake a provided domain up from s3 *)
554+ let send_s3resume ~xc ~xs domid =
555+ Xc. domain_send_s3resume xc domid;
556+ xs.Xs. write (xs.Xs. getdomainpath domid ^ " /wakeup-req" ) " 1"
554557
555558let make_stubdom ~xc ~xs ~ioemuargs info uuid =
556559 let ssidref =
Original file line number Diff line number Diff line change @@ -823,15 +823,15 @@ let set_cores_per_socket xc domid cfg =
823823 with exn -> warn " exception ignored during cores-per-socket setting: %s" (Printexc. to_string exn )
824824
825825
826- let do_trigger xc state args =
826+ let do_trigger xc xs state args =
827827 match args with
828828 | "s3resume" :: _ ->
829829 if state.vm_lifestate <> VmRunning then
830830 Xenvmlib. Error (" cannot do s3resume on a non-running guest" )
831831 else if not state.vm_cfg.hvm then
832832 Xenvmlib. Error (" cannot do s3resume on a non-hvm guest" )
833833 else (
834- Domain. send_s3resume ~xc state.vm_domid;
834+ Domain. send_s3resume ~xc ~xs state.vm_domid;
835835 Xenvmlib. Ok
836836 )
837837 | _ ->
Original file line number Diff line number Diff line change @@ -563,7 +563,7 @@ let do_task state (task, args) =
563563 Vmact. set state field value
564564 | Tasks. Trigger ->
565565 let params = Tasks. args_get_liststring args " params" in
566- with_xc (fun xc -> Vmact. do_trigger xc state params)
566+ with_xcs (fun xc xs -> Vmact. do_trigger xc xs state params)
567567 | Tasks. SetNicBackendDom ->
568568 let id = Int64. to_int (Tasks. args_get_int args " id" ) in
569569 let domid = Int64. to_int (Tasks. args_get_int args " domid" ) in
You can’t perform that action at this time.
0 commit comments