From 61b635341a818e2d1fafb35968619294cab715b0 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 17 Feb 2011 11:04:20 +0000 Subject: [PATCH] --- yaml --- r: 234229 b: refs/heads/master c: 36b401e2c2788c7b4881115ddbbff603fe4cf78d h: refs/heads/master i: 234227: 96807367ea7a93e5a6351d650bd3b1d342294801 v: v3 --- [refs] | 2 +- trunk/drivers/xen/manage.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index fa9341ed16bc..e945e304a37a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ceb180294790c8a6a437533488616f6b591b49d0 +refs/heads/master: 36b401e2c2788c7b4881115ddbbff603fe4cf78d diff --git a/trunk/drivers/xen/manage.c b/trunk/drivers/xen/manage.c index 5c0184fb9d84..6ce6b91e7645 100644 --- a/trunk/drivers/xen/manage.c +++ b/trunk/drivers/xen/manage.c @@ -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 @@ -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(); @@ -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(); @@ -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