From 96807367ea7a93e5a6351d650bd3b1d342294801 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 17 Feb 2011 11:04:20 +0000 Subject: [PATCH] --- yaml --- r: 234227 b: refs/heads/master c: bd1c0ad28451df4610d352c7e438213c84de0c28 h: refs/heads/master i: 234225: dc01e7a096656e66e8b187b818d8284aac32fdcc 234223: bed15a0091826b405489b636d45544ecd2907e20 v: v3 --- [refs] | 2 +- trunk/drivers/xen/manage.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 5419d45f2fc2..e9096b139976 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a8b7458363b9174f3c2196ca6085630b4b30b7a1 +refs/heads/master: bd1c0ad28451df4610d352c7e438213c84de0c28 diff --git a/trunk/drivers/xen/manage.c b/trunk/drivers/xen/manage.c index 972bf783a182..4dd01865ad18 100644 --- a/trunk/drivers/xen/manage.c +++ b/trunk/drivers/xen/manage.c @@ -38,7 +38,6 @@ static enum shutdown_state shutting_down = SHUTDOWN_INVALID; static int xen_hvm_suspend(void *data) { int err; - struct sched_shutdown r = { .reason = SHUTDOWN_suspend }; int *cancelled = data; BUG_ON(!irqs_disabled()); @@ -50,7 +49,12 @@ static int xen_hvm_suspend(void *data) return err; } - *cancelled = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r); + /* + * This hypercall returns 1 if suspend was cancelled + * or the domain was merely checkpointed, and 0 if it + * is resuming in a new domain. + */ + *cancelled = HYPERVISOR_suspend(0UL); xen_hvm_post_suspend(*cancelled); gnttab_resume();