Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234229
b: refs/heads/master
c: 36b401e
h: refs/heads/master
i:
  234227: 9680736
v: v3
  • Loading branch information
Ian Campbell authored and Stefano Stabellini committed Feb 25, 2011
1 parent c09a65a commit 61b6353
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ceb180294790c8a6a437533488616f6b591b49d0
refs/heads/master: 36b401e2c2788c7b4881115ddbbff603fe4cf78d
10 changes: 8 additions & 2 deletions trunk/drivers/xen/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ static enum shutdown_state shutting_down = SHUTDOWN_INVALID;

struct suspend_info {
int cancelled;
unsigned long arg; /* extra hypercall argument */
};

#ifdef CONFIG_PM_SLEEP
Expand All @@ -58,7 +59,7 @@ static int xen_hvm_suspend(void *data)
* or the domain was merely checkpointed, and 0 if it
* is resuming in a new domain.
*/
si->cancelled = HYPERVISOR_suspend(0UL);
si->cancelled = HYPERVISOR_suspend(si->arg);

xen_hvm_post_suspend(si->cancelled);
gnttab_resume();
Expand Down Expand Up @@ -97,7 +98,7 @@ static int xen_suspend(void *data)
* or the domain was merely checkpointed, and 0 if it
* is resuming in a new domain.
*/
si->cancelled = HYPERVISOR_suspend(virt_to_mfn(xen_start_info));
si->cancelled = HYPERVISOR_suspend(si->arg);

xen_post_suspend(si->cancelled);
gnttab_resume();
Expand Down Expand Up @@ -149,6 +150,11 @@ static void do_suspend(void)

si.cancelled = 1;

if (xen_hvm_domain())
si.arg = 0UL;
else
si.arg = virt_to_mfn(xen_start_info);

if (xen_hvm_domain())
err = stop_machine(xen_hvm_suspend, &si, cpumask_of(0));
else
Expand Down

0 comments on commit 61b6353

Please sign in to comment.