summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/xen/hypercall.h
diff options
context:
space:
mode:
authorIan Campbell2011-02-17 12:04:20 +0100
committerStefano Stabellini2011-02-25 17:43:10 +0100
commit8e15597fa430c03415e2268dfbae0f262b948788 (patch)
tree33a132fefac3ef8c540ecfe63145d1ca4f5b4a06 /arch/x86/include/asm/xen/hypercall.h
parentxen: do not respond to unknown xenstore control requests (diff)
downloadkernel-qcow2-linux-8e15597fa430c03415e2268dfbae0f262b948788.tar.gz
kernel-qcow2-linux-8e15597fa430c03415e2268dfbae0f262b948788.tar.xz
kernel-qcow2-linux-8e15597fa430c03415e2268dfbae0f262b948788.zip
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: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/include/asm/xen/hypercall.h')
-rw-r--r--arch/x86/include/asm/xen/hypercall.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen/hypercall.h
index a3c28ae4025b..a7d5823862b4 100644
--- a/arch/x86/include/asm/xen/hypercall.h
+++ b/arch/x86/include/asm/xen/hypercall.h
@@ -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