aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-02-17 06:04:20 -0500
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2011-02-25 11:43:11 -0500
commitbd1c0ad28451df4610d352c7e438213c84de0c28 (patch)
tree92710a262ae76c67fc06008e848ccc81ec9a13b0 /drivers
parenta8b7458363b9174f3c2196ca6085630b4b30b7a1 (diff)
xen: suspend: use HYPERVISOR_suspend for PVHVM case instead of open coding
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/xen/manage.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 972bf783a182..4dd01865ad18 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -38,7 +38,6 @@ static enum shutdown_state shutting_down = SHUTDOWN_INVALID;
38static int xen_hvm_suspend(void *data) 38static int xen_hvm_suspend(void *data)
39{ 39{
40 int err; 40 int err;
41 struct sched_shutdown r = { .reason = SHUTDOWN_suspend };
42 int *cancelled = data; 41 int *cancelled = data;
43 42
44 BUG_ON(!irqs_disabled()); 43 BUG_ON(!irqs_disabled());
@@ -50,7 +49,12 @@ static int xen_hvm_suspend(void *data)
50 return err; 49 return err;
51 } 50 }
52 51
53 *cancelled = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r); 52 /*
53 * This hypercall returns 1 if suspend was cancelled
54 * or the domain was merely checkpointed, and 0 if it
55 * is resuming in a new domain.
56 */
57 *cancelled = HYPERVISOR_suspend(0UL);
54 58
55 xen_hvm_post_suspend(*cancelled); 59 xen_hvm_post_suspend(*cancelled);
56 gnttab_resume(); 60 gnttab_resume();