Skip to content

Commit

Permalink
xen: use new schedop interface for suspend
Browse files Browse the repository at this point in the history
Take the opportunity to comment on the semantics of the PV guest
suspend hypercall arguments.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Ian Campbell authored and Stefano Stabellini committed Feb 25, 2011
1 parent 5527172 commit 8e15597
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions arch/x86/include/asm/xen/hypercall.h
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,17 @@ HYPERVISOR_set_segment_base(int reg, unsigned long value)
#endif

static inline int
HYPERVISOR_suspend(unsigned long srec)
HYPERVISOR_suspend(unsigned long start_info_mfn)
{
return _hypercall3(int, sched_op, SCHEDOP_shutdown,
SHUTDOWN_suspend, srec);
struct sched_shutdown r = { .reason = SHUTDOWN_suspend };

/*
* 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
Expand Down

0 comments on commit 8e15597

Please sign in to comment.