Commit 8e15597f authored by Ian Campbell's avatar Ian Campbell Committed by Stefano Stabellini

xen: use new schedop interface for suspend

Take the opportunity to comment on the semantics of the PV guest
suspend hypercall arguments.
Signed-off-by: default avatarIan Campbell <ian.campbell@citrix.com>
Reviewed-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent 55271723
...@@ -422,10 +422,17 @@ HYPERVISOR_set_segment_base(int reg, unsigned long value) ...@@ -422,10 +422,17 @@ HYPERVISOR_set_segment_base(int reg, unsigned long value)
#endif #endif
static inline int static inline int
HYPERVISOR_suspend(unsigned long srec) HYPERVISOR_suspend(unsigned long start_info_mfn)
{ {
return _hypercall3(int, sched_op, SCHEDOP_shutdown, struct sched_shutdown r = { .reason = SHUTDOWN_suspend };
SHUTDOWN_suspend, srec);
/*
* For a PV guest the tools require that the start_info mfn be
* present in rdx/edx when the hypercall is made. Per the
* hypercall calling convention this is the third hypercall
* argument, which is start_info_mfn here.
*/
return _hypercall3(int, sched_op_new, SCHEDOP_shutdown, &r, start_info_mfn);
} }
static inline int static inline int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment