Skip to content

Commit

Permalink
xen: suspend: use HYPERVISOR_suspend for PVHVM case instead of open c…
Browse files Browse the repository at this point in the history
…oding

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 a8b7458 commit bd1c0ad
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/xen/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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();
Expand Down

0 comments on commit bd1c0ad

Please sign in to comment.